Make Treesitter optional for vim support

Still support vim.
Therefore make Treesitter adjustments depending on neovim.
This commit is contained in:
Daniel Siepmann 2024-10-04 08:51:02 +02:00
parent e91f74fe98
commit c2f44d943a
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 82 additions and 68 deletions

View file

@ -1,5 +1,11 @@
# Changelog # Changelog
## v1.7.1 2024-10-04
### Fixed
- Keep compatibility with vim, which does not have Treesitter
## v1.7.0 2024-05-21 ## v1.7.0 2024-05-21
### Added ### Added

View file

@ -77,6 +77,8 @@ hi link Number String
hi Error cterm=none ctermbg=none ctermfg=red hi Error cterm=none ctermbg=none ctermfg=red
hi Todo cterm=none ctermbg=none ctermfg=yellow hi Todo cterm=none ctermbg=none ctermfg=yellow
if has('nvim')
" Treesitter " Treesitter
hi @namespace cterm=none ctermbg=none ctermfg=white hi @namespace cterm=none ctermbg=none ctermfg=white
hi @type cterm=none ctermbg=none ctermfg=blue hi @type cterm=none ctermbg=none ctermfg=blue
@ -140,10 +142,14 @@ hi @markup.heading.6.markdown cterm=none ctermbg=none ctermfg=blue
hi link @keyword.operator.sql @type.builtin hi link @keyword.operator.sql @type.builtin
hi link @keyword.sql @type.builtin hi link @keyword.sql @type.builtin
endif
" XML Treesitter " XML Treesitter
hi link xmlTag Identifier hi link xmlTag Identifier
hi link xmlTagName Identifier hi link xmlTagName Identifier
if has('nvim')
" PHPDoc Treesitter (Keep everything as comment) " PHPDoc Treesitter (Keep everything as comment)
hi link @type.phpdoc @comment hi link @type.phpdoc @comment
hi link @attribute.phpdoc @comment hi link @attribute.phpdoc @comment
@ -156,6 +162,8 @@ hi link @text.uri.phpdoc @comment
" JSON Treesitter " JSON Treesitter
hi link @label.json @string hi link @label.json @string
endif
" Diff " Diff
hi DiffAdd cterm=bold ctermbg=2 ctermfg=15 hi DiffAdd cterm=bold ctermbg=2 ctermfg=15
hi DiffChange cterm=bold ctermbg=4 ctermfg=15 hi DiffChange cterm=bold ctermbg=4 ctermfg=15