mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
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:
@ -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' })
|
||||
|
Reference in New Issue
Block a user