mike325 / nvim-terminal.lua

A high performance filetype mode for Neovim which leverages conceal and highlights your buffer with the correct color codes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terminal.lua

luadoc

A high performance filetype mode for Neovim which leverages conceal and highlights your buffer with the correct color codes.

Demo

Demo

Demo.mp4

Installation and Usage

Use your plugin manager or clone directly into your runtimepath.

Plug 'norcalli/nvim-terminal.lua'

The most basic setup is the following. This will create an autocmd to highlight. Otherwise, only the syntax file with the conceal codes will be included.

lua require'terminal'.setup()

Then you can just setl filetype=terminal to activate the mode.

NOTE: If you want to completely hide the color codes, you can use concealcursor (:h concealcursor) to that effect. Setting it to setl concealcursor=nc would hide the codes until you went into visual mode or insert mode. This may make it seem like the cursor is lagging when you are travelling over text, but the cursor doesn't move if it is over hidden codes, so be aware of that effect.

For more advanced usage, see the Luadoc documentation or use :h terminal.lua once installed.

TODO

  • Add underline, italic, and other code modes.
  • Look into further performance improvements by eliminating work.
  • See if I can get fenced blocks to work in markdown mode.

About

A high performance filetype mode for Neovim which leverages conceal and highlights your buffer with the correct color codes.

License:MIT License


Languages

Language:Lua 97.0%Language:Vim Script 2.6%Language:Shell 0.4%