terminal.lua
A high performance filetype mode for Neovim which leverages conceal
and
highlights your buffer with the correct color codes.
Demo
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.