aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight_group.c
diff options
context:
space:
mode:
authorswarn <swarn@users.noreply.github.com>2023-03-06 12:03:13 -0600
committerGitHub <noreply@github.com>2023-03-06 19:03:13 +0100
commit1cc23e1109ed88275df5c986c352f73b99a0301c (patch)
treefd393eb4eedf048e4e1ab09b0c39073c9cd3881e /src/nvim/highlight_group.c
parent98f2df931ad8657f21124d8a6024967c5997fc99 (diff)
downloadrneovim-1cc23e1109ed88275df5c986c352f73b99a0301c.tar.gz
rneovim-1cc23e1109ed88275df5c986c352f73b99a0301c.tar.bz2
rneovim-1cc23e1109ed88275df5c986c352f73b99a0301c.zip
feat(lsp)!: add rule-based sem token highlighting (#22022)
feat(lsp)!: change semantic token highlighting Change the default highlights used, and add more highlights per token. Add an LspTokenUpdate event and a highlight_token function. :Inspect now shows any highlights applied by token highlighting rules, default or user-defined. BREAKING CHANGE: change the default highlight groups used by semantic token highlighting.
Diffstat (limited to 'src/nvim/highlight_group.c')
-rw-r--r--src/nvim/highlight_group.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c
index d2f5b60dc6..70ee6c757c 100644
--- a/src/nvim/highlight_group.c
+++ b/src/nvim/highlight_group.c
@@ -270,16 +270,22 @@ static const char *highlight_init_both[] = {
"default link @tag Tag",
// LSP semantic tokens
- "default link @class Structure",
- "default link @struct Structure",
- "default link @enum Type",
- "default link @enumMember Constant",
- "default link @event Identifier",
- "default link @interface Identifier",
- "default link @modifier Identifier",
- "default link @regexp SpecialChar",
- "default link @typeParameter Type",
- "default link @decorator Identifier",
+ "default link @lsp.type.class Structure",
+ "default link @lsp.type.decorator Function",
+ "default link @lsp.type.enum Structure",
+ "default link @lsp.type.enumMember Constant",
+ "default link @lsp.type.function Function",
+ "default link @lsp.type.interface Structure",
+ "default link @lsp.type.macro Macro",
+ "default link @lsp.type.method Function",
+ "default link @lsp.type.namespace Structure",
+ "default link @lsp.type.parameter Identifier",
+ "default link @lsp.type.property Identifier",
+ "default link @lsp.type.struct Structure",
+ "default link @lsp.type.type Type",
+ "default link @lsp.type.typeParameter TypeDef",
+ "default link @lsp.type.variable Identifier",
+
NULL
};