Make Treesitter optional for vim support
Still support vim. Therefore make Treesitter adjustments depending on neovim.
This commit is contained in:
parent
e91f74fe98
commit
c2f44d943a
2 changed files with 82 additions and 68 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue