navi/docs/widgets/howto/VIM.md
alexis-opolka df8c0ff7b3 Update docs on widgets
Signed-off-by: alexis-opolka <53085471+alexis-opolka@users.noreply.github.com>
2025-04-30 22:14:03 +02:00

583 B

Vim widget

Syntax Highlighting

If you want syntax highlighting support for Navi in Vim, you need to add those syntax rules to your syntax files such as at $VIMRUNTIME/syntax/navi.vim.

The rules are defined based on the Cheatsheet syntax.

Here is an example:

syntax match Comment "\v^;.*$"
syntax match Statement "\v^\%.*$"
syntax match Operator "\v^\#.*$"
syntax match String "\v\<.{-}\>"
syntax match String "\v^\$.*$"