highlight: use custom highlight groups

This commit is contained in:
Thomas Vigouroux 2020-06-21 19:43:02 +02:00 committed by Thomas Vigouroux
parent 2d224ac3bf
commit 282e18edd1
4 changed files with 235 additions and 33 deletions

View file

@ -166,4 +166,135 @@ Note: This is highly experimental, and folding can break on some types of
edits. If you encounter such breakage, hiting `zx` should fix folding.
In any case, feel free to open an issue with the reproducing steps.
==============================================================================
HIGHLIGHTS *nvim-treesitter-highlights*
TSError
`TSPunctDelimiter`
*hl-TSPunctDelimiter*
For delimiters ie: `.`
`TSPunctBracket`
*hl-TSPunctBracket*
For brackets and parens.
`TSPunctSpecial`
*hl-TSPunctSpecial*
For special punctutation that does not fall in the catagories before.
`TSConstant`
*hl-TSConstant*
For constants
`TSConstBuiltin`
*hl-TSConstBuiltin*
For constant that are built in the language: `nil` in Lua.
`TSConstMacro`
*hl-TSConstMacro*
For constants that are defined by macros: `NULL` in C.
`TSString`
*hl-TSString*
For strings.
`TSStringRegex`
*hl-TSStringRegex*
For regexes.
`TSStringEscape`
*hl-TSStringEscape*
For escape characters within a string.
`TSCharacter`
*hl-TSCharacter*
For characters.
`TSNumber`
*hl-TSNumber*
For integers.
`TSBoolean`
*hl-TSBoolean*
For booleans.
`TSFloat`
*hl-TSFloat*
For floats.
`TSFunction`
*hl-TSFunction*
For function (calls and definitions).
`TSFuncBuiltin`
*hl-TSFuncBuiltin*
For builtin functions: `table.insert` in Lua.
`TSFuncMacro`
*hl-TSFuncMacro*
For macro defined fuctions (calls and definitions): each `macro_rules` in
Rust.
`TSParameter`
*hl-TSParameter*
For parameters of a function.
`TSMethod`
*hl-TSMethod*
For method calls and definitions.
`TSField`
*hl-TSField*
For fields.
`TSProperty`
*hl-TSProperty*
Same as `TSField`.
`TSConstructor`
*hl-TSConstructor*
For constructor calls and definitions: `{}` in Lua, and Java constructors.
`TSConditional`
*hl-TSConditional*
For keywords related to conditionnals.
`TSRepeat`
*hl-TSRepeat*
For keywords related to loops.
`TSLabel`
*hl-TSLabel*
For labels: `labe:` in C and `:label:` in Lua.
`TSOperator`
*hl-TSOperator*
For any operator: `+`, but also `->` and `*` in C.
`TSKeyword`
*hl-TSKeyword*
For keywords that don't fall in previous categories.
`TSException`
*hl-TSException*
For exception related keywords.
`TSType`
*hl-TSType*
For types.
`TSTypeBuiltin`
*hl-TSTypeBuiltin*
For builtin types (you guessed it, right ?).
`TSStructure`
*hl-TSStructure*
This is left as an exercise for the reader.
`TSInclude`
*hl-TSInclude*
For includes: `#include` in C, `use` or `extern crate` in Rust, or `require`
in Lua
vim:tw=78:ts=8:noet:ft=help:norl:

View file

@ -5,9 +5,41 @@
:TSInstall nvim-treesitter.txt /*:TSInstall*
:TSInstallInfo nvim-treesitter.txt /*:TSInstallInfo*
:TSModuleInfo nvim-treesitter.txt /*:TSModuleInfo*
hl-TSBoolean nvim-treesitter.txt /*hl-TSBoolean*
hl-TSCharacter nvim-treesitter.txt /*hl-TSCharacter*
hl-TSConditional nvim-treesitter.txt /*hl-TSConditional*
hl-TSConstBuiltin nvim-treesitter.txt /*hl-TSConstBuiltin*
hl-TSConstMacro nvim-treesitter.txt /*hl-TSConstMacro*
hl-TSConstant nvim-treesitter.txt /*hl-TSConstant*
hl-TSConstructor nvim-treesitter.txt /*hl-TSConstructor*
hl-TSException nvim-treesitter.txt /*hl-TSException*
hl-TSField nvim-treesitter.txt /*hl-TSField*
hl-TSFloat nvim-treesitter.txt /*hl-TSFloat*
hl-TSFuncBuiltin nvim-treesitter.txt /*hl-TSFuncBuiltin*
hl-TSFuncMacro nvim-treesitter.txt /*hl-TSFuncMacro*
hl-TSFunction nvim-treesitter.txt /*hl-TSFunction*
hl-TSInclude nvim-treesitter.txt /*hl-TSInclude*
hl-TSKeyword nvim-treesitter.txt /*hl-TSKeyword*
hl-TSLabel nvim-treesitter.txt /*hl-TSLabel*
hl-TSMethod nvim-treesitter.txt /*hl-TSMethod*
hl-TSNumber nvim-treesitter.txt /*hl-TSNumber*
hl-TSOperator nvim-treesitter.txt /*hl-TSOperator*
hl-TSParameter nvim-treesitter.txt /*hl-TSParameter*
hl-TSProperty nvim-treesitter.txt /*hl-TSProperty*
hl-TSPunctBracket nvim-treesitter.txt /*hl-TSPunctBracket*
hl-TSPunctDelimiter nvim-treesitter.txt /*hl-TSPunctDelimiter*
hl-TSPunctSpecial nvim-treesitter.txt /*hl-TSPunctSpecial*
hl-TSRepeat nvim-treesitter.txt /*hl-TSRepeat*
hl-TSString nvim-treesitter.txt /*hl-TSString*
hl-TSStringEscape nvim-treesitter.txt /*hl-TSStringEscape*
hl-TSStringRegex nvim-treesitter.txt /*hl-TSStringRegex*
hl-TSStructure nvim-treesitter.txt /*hl-TSStructure*
hl-TSType nvim-treesitter.txt /*hl-TSType*
hl-TSTypeBuiltin nvim-treesitter.txt /*hl-TSTypeBuiltin*
nvim-treesitter nvim-treesitter.txt /*nvim-treesitter*
nvim-treesitter-commands nvim-treesitter.txt /*nvim-treesitter-commands*
nvim-treesitter-functions nvim-treesitter.txt /*nvim-treesitter-functions*
nvim-treesitter-highlights nvim-treesitter.txt /*nvim-treesitter-highlights*
nvim-treesitter-intro nvim-treesitter.txt /*nvim-treesitter-intro*
nvim-treesitter-quickstart nvim-treesitter.txt /*nvim-treesitter-quickstart*
nvim-treesitter-utils nvim-treesitter.txt /*nvim-treesitter-utils*