Add version check for neovim

Add compatibility with older neovim to support older version of
nvim-treesitter
This commit is contained in:
yuys13 2022-10-18 12:52:11 +09:00
parent ed78f2f6b1
commit 84adf19f1d

View file

@ -100,50 +100,52 @@ if exists('g:loaded_nvim_treesitter')
" which in turn links to Identifer (white). " which in turn links to Identifer (white).
hi! link TSTagAttribute DraculaGreenItalic hi! link TSTagAttribute DraculaGreenItalic
" # Misc if has('nvim-0.8')
hi! link @punctuation.delimiter Delimiter " # Misc
hi! link @punctuation.bracket Normal hi! link @punctuation.delimiter Delimiter
hi! link @punctuation.special Special hi! link @punctuation.bracket Normal
" # Constants hi! link @punctuation.special Special
hi! link @constant Constant " # Constants
hi! link @constant.builtin Constant hi! link @constant Constant
hi! link @constant.macro Macro hi! link @constant.builtin Constant
hi! link @string.regex String hi! link @constant.macro Macro
hi! link @string.escape Character hi! link @string.regex String
hi! link @symbol DraculaPurple hi! link @string.escape Character
hi! link @annotation DraculaYellow hi! link @symbol DraculaPurple
hi! link @attribute DraculaGreenItalic hi! link @annotation DraculaYellow
hi! link @namespace Structure hi! link @attribute DraculaGreenItalic
" # Functions hi! link @namespace Structure
hi! link @function.builtin DraculaCyan " # Functions
hi! link @funcion.macro Function hi! link @function.builtin DraculaCyan
hi! link @parameter DraculaOrangeItalic hi! link @funcion.macro Function
hi! link @parameter.reference DraculaOrange hi! link @parameter DraculaOrangeItalic
hi! link @field DraculaOrange hi! link @parameter.reference DraculaOrange
hi! link @property Normal hi! link @field DraculaOrange
hi! link @constructor DraculaCyan hi! link @property Normal
" # Keywords hi! link @constructor DraculaCyan
hi! link @label DraculaPurpleItalic " # Keywords
hi! link @keyword.function DraculaCyan hi! link @label DraculaPurpleItalic
hi! link @keyword.operator Operator hi! link @keyword.function DraculaCyan
hi! link @exception DraculaPurple hi! link @keyword.operator Operator
" # Variable hi! link @exception DraculaPurple
hi! link @variable Normal " # Variable
hi! link @variable.builtin DraculaPurpleItalic hi! link @variable Normal
" # Text hi! link @variable.builtin DraculaPurpleItalic
hi! link @text Normal " # Text
hi! link @text.strong DraculaFgBold hi! link @text Normal
hi! link @text.emphasis DraculaFg hi! link @text.strong DraculaFgBold
hi! link @text.underline Underlined hi! link @text.emphasis DraculaFg
hi! link @text.title DraculaYellow hi! link @text.underline Underlined
hi! link @text.literal DraculaYellow hi! link @text.title DraculaYellow
hi! link @text.uri DraculaYellow hi! link @text.literal DraculaYellow
" # Tags hi! link @text.uri DraculaYellow
hi! link @tag DraculaCyan " # Tags
hi! link @tag.delimiter Normal hi! link @tag DraculaCyan
" HTML and JSX tag attributes. By default, this group is linked to TSProperty, hi! link @tag.delimiter Normal
" which in turn links to Identifer (white). " HTML and JSX tag attributes. By default, this group is linked to TSProperty,
hi! link @tag.attribute DraculaGreenItalic " which in turn links to Identifer (white).
hi! link @tag.attribute DraculaGreenItalic
endif
endif endif
" }}} " }}}
" nvim-cmp: {{{ " nvim-cmp: {{{