From c30ebb17f6b98625e3db8f032c2223876bb60f99 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 3 Mar 2024 11:18:34 +0100 Subject: 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. --- runtime/colors/vim.lua | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'runtime/colors/vim.lua') diff --git a/runtime/colors/vim.lua b/runtime/colors/vim.lua index 5a29ba0ec6..7231418f5f 100644 --- a/runtime/colors/vim.lua +++ b/runtime/colors/vim.lua @@ -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' }) -- cgit