diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-10-18 18:46:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 18:46:09 +0200 |
commit | aa2f08a050682ed6b2ffae521feec88451f2d3c0 (patch) | |
tree | b3c6363efd6e68ed95c561ced02f367518256bc8 /src | |
parent | ef4c339fb9de87f7534303e006c281e40327f803 (diff) | |
download | rneovim-aa2f08a050682ed6b2ffae521feec88451f2d3c0.tar.gz rneovim-aa2f08a050682ed6b2ffae521feec88451f2d3c0.tar.bz2 rneovim-aa2f08a050682ed6b2ffae521feec88451f2d3c0.zip |
fix(highlight): link more treesitter groups by default (#20711)
Problem: Captures used by bundled parsers are not highlighted by default
Solution: Add links to default groups
A link is added for a capture if
* there is a default group of the same name (e.g., `@tag` -> `Tag`)
* it's used in a bundled query and doesn't have a reasonable fallback
(e.g., `@text.literal`)
Also add all linked groups to the treesitter docs.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/highlight_group.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c index 3508560e20..4c253480be 100644 --- a/src/nvim/highlight_group.c +++ b/src/nvim/highlight_group.c @@ -98,8 +98,6 @@ enum { // The default highlight groups. These are compiled-in for fast startup and // they still work when the runtime files can't be found. -// -// When making changes here, also change runtime/colors/default.vim! static const char *highlight_init_both[] = { "Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey", @@ -186,9 +184,13 @@ static const char *highlight_init_both[] = { "default link DiagnosticSignInfo DiagnosticInfo", "default link DiagnosticSignHint DiagnosticHint", + // Text + "default link @text.literal Comment", + "default link @text.reference Identifier", + "default link @text.title Title", + "default link @text.uri Underlined", "default link @text.underline Underlined", - "default link @todo Todo", - "default link @debug Debug", + "default link @text.todo Todo", // Miscs "default link @comment Comment", @@ -202,6 +204,7 @@ static const char *highlight_init_both[] = { "default link @macro Macro", "default link @string String", "default link @string.escape SpecialChar", + "default link @string.special SpecialChar", "default link @character Character", "default link @character.special SpecialChar", "default link @number Number", @@ -226,12 +229,16 @@ static const char *highlight_init_both[] = { "default link @keyword Keyword", "default link @exception Exception", + "default link @variable Identifier", "default link @type Type", "default link @type.definition Typedef", "default link @storageclass StorageClass", "default link @structure Structure", + "default link @namespace Identifier", "default link @include Include", "default link @preproc PreProc", + "default link @debug Debug", + "default link @tag Tag", NULL }; |