fix(treesitter): document more standard highlight groups

Problem: Not all standard treesitter groups are documented.

Solution: Document them all (without relying on fallback); add default
link for new `*.builtin` groups to `Special` and `@keyword.type` to
`Structure`. Remove `@markup.environment.*` which only made sense for
LaTeX.
This commit is contained in:
Christian Clason
2024-03-03 11:18:34 +01:00
parent 5e875ae8d0
commit c30ebb17f6
4 changed files with 50 additions and 35 deletions

View File

@ -158,18 +158,22 @@ hi('@boolean', { link = 'Boolean' })
hi('@number.float', { link = 'Float' })
-- Functions
hi('@function', { link = 'Function' })
hi('@function.builtin', { link = 'Special' })
hi('@function.macro', { link = 'Macro' })
hi('@variable.parameter', { link = 'Identifier' })
hi('@function.method', { link = 'Function' })
hi('@variable.member', { link = 'Identifier' })
hi('@property', { link = 'Identifier' })
hi('@constructor', { link = 'Special' })
hi('@function', { link = 'Function' })
hi('@function.builtin', { link = 'Special' })
hi('@function.macro', { link = 'Macro' })
hi('@function.method', { link = 'Function' })
hi('@variable.parameter', { link = 'Identifier' })
hi('@variable.parameter.builtin', { link = 'Special' })
hi('@variable.member', { link = 'Identifier' })
hi('@property', { link = 'Identifier' })
hi('@attribute', { link = 'Macro' })
hi('@attribute.builtin', { link = 'Special' })
hi('@constructor', { link = 'Special' })
-- Keywords
hi('@keyword.conditional', { link = 'Conditional' })
hi('@keyword.repeat', { link = 'Repeat' })
hi('@keyword.type', { link = 'Structure' })
hi('@label', { link = 'Label' })
hi('@operator', { link = 'Operator' })
hi('@keyword', { link = 'Keyword' })
@ -178,12 +182,12 @@ hi('@keyword.exception', { link = 'Exception' })
hi('@variable', { link = 'Identifier' })
hi('@type', { link = 'Type' })
hi('@type.definition', { link = 'Typedef' })
hi('@keyword.storage', { link = 'StorageClass' })
hi('@module', { link = 'Identifier' })
hi('@keyword.import', { link = 'Include' })
hi('@keyword.directive', { link = 'PreProc' })
hi('@keyword.debug', { link = 'Debug' })
hi('@tag', { link = 'Tag' })
hi('@tag.builtin', { link = 'Special' })
-- LSP semantic tokens
hi('@lsp.type.class', { link = 'Structure' })