Highlight tag attributes via tree-sitter. (#255)

* Highlight tag attributes via tree sitter.

* Comments about tree-sitter hightlight groups.
This commit is contained in:
Adrian Trunzo 2021-08-06 11:50:31 -04:00 committed by GitHub
parent 869f70a760
commit 074a6b3495
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,6 +62,11 @@ if has('nvim-0.5') && luaeval("pcall(require, 'gitsigns')")
endif endif
" }}} " }}}
" Tree-sitter: {{{ " Tree-sitter: {{{
" The nvim-treesitter library defines many global highlight groups that are
" linked to the regular vim syntax highlight groups. We only need to redefine
" those highlight groups when the defaults do not match the dracula
" specification.
" https://github.com/nvim-treesitter/nvim-treesitter/blob/master/plugin/nvim-treesitter.vim
if exists('g:loaded_nvim_treesitter') if exists('g:loaded_nvim_treesitter')
" # Misc " # Misc
hi! link TSPunctSpecial Special hi! link TSPunctSpecial Special
@ -89,6 +94,9 @@ if exists('g:loaded_nvim_treesitter')
hi! link TSTitle DraculaYellow hi! link TSTitle DraculaYellow
hi! link TSLiteral DraculaYellow hi! link TSLiteral DraculaYellow
hi! link TSURI DraculaYellow hi! link TSURI DraculaYellow
" HTML and JSX tag attributes. By default, this group is linked to TSProperty,
" which in turn links to Identifer (white).
hi! link TSTagAttribute DraculaGreenItalic
endif endif
" }}} " }}}