fix(semantic_tokens): dont use @lsp.type.variable. Added builtin variable support

This commit is contained in:
Folke Lemaitre
2023-03-08 14:12:51 +01:00
parent d9321a9edb
commit 3ebc29df62

View File

@@ -260,8 +260,9 @@ function M.setup()
["@lsp.type.namespace"] = { link = "@namespace" }, ["@lsp.type.namespace"] = { link = "@namespace" },
["@lsp.type.parameter"] = { link = "@parameter" }, ["@lsp.type.parameter"] = { link = "@parameter" },
["@lsp.type.property"] = { link = "@property" }, ["@lsp.type.property"] = { link = "@property" },
["@lsp.type.variable"] = { link = "@variable" }, ["@lsp.type.variable"] = {}, -- use treesitter styles for regular variables
["@lsp.typemod.function.defaultLibrary"] = { link = "Special" }, ["@lsp.typemod.function.defaultLibrary"] = { link = "Special" },
["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" },
-- NOTE: maybe add these with distinct highlights? -- NOTE: maybe add these with distinct highlights?
-- ["@lsp.typemod.variable.globalScope"] (global variables) -- ["@lsp.typemod.variable.globalScope"] (global variables)