Skip to content

Commit

Permalink
feat(semanic_tokens): add missing semanic tokens (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenEast committed Jan 24, 2024
1 parent ae41992 commit 378ed7e
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions lua/nightfox/group/modules/lsp_semantic_tokens.lua
Expand Up @@ -4,19 +4,35 @@ local M = {}

function M.get(spec, config, opts)
return {
-- LSP Semantic token highlight groups
["@lsp.type.boolean"] = { link = "@boolean" },
["@lsp.type.builtinType"] = { link = "@type.builtin" },
["@lsp.type.comment"] = { link = "@comment" },
["@lsp.type.enum"] = { link = "@type" },
["@lsp.type.enumMember"] = { link = "@constant" },
["@lsp.type.escapeSequence"] = { link = "@string.escape" },
["@lsp.type.formatSpecifier"] = { link = "@punctuation.special" },
["@lsp.type.interface"] = { fg = spec.syntax.builtin3 },
["@lsp.type.keyword"] = { link = "@keyword" },
["@lsp.type.interface"] = { link = "@interface" },
["@lsp.type.namespace"] = { link = "@namespace" },
["@lsp.type.namespace"] = { link = "@module" },
["@lsp.type.number"] = { link = "@number" },
["@lsp.type.operator"] = { link = "@operator" },
["@lsp.type.parameter"] = { link = "@parameter" },
["@lsp.type.property"] = { link = "@property" },
["@lsp.type.selfKeyword"] = { link = "@variable.builtin" },
["@lsp.type.typeAlias"] = { link = "@type.definition" },
["@lsp.type.unresolvedReference"] = { link = "@error" },
["@lsp.type.variable"] = {}, -- use treesitter styles for regular variables
["@lsp.typemod.method.defaultLibrary"] = { link = "@function.builtin" },
["@lsp.typemod.class.defaultLibrary"] = { link = "@type.builtin" },
["@lsp.typemod.enum.defaultLibrary"] = { link = "@type.builtin" },
["@lsp.typemod.enumMember.defaultLibrary"] = { link = "@constant.builtin" },
["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" },
["@lsp.typemod.keyword.async"] = { link = "@keyword.coroutine" },
["@lsp.typemod.macro.defaultLibrary"] = { link = "@function.builtin" },
["@lsp.typemod.method.defaultLibrary"] = { link = "@function.builtin" },
["@lsp.typemod.operator.injected"] = { link = "@operator" },
["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" },
["@lsp.typemod.string.injected"] = { link = "@string" },
["@lsp.typemod.type.defaultLibrary"] = { link = "@type.builtin" },
["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" },
["@lsp.typemod.variable.injected"] = { link = "@variable" },
}
end
Expand Down

0 comments on commit 378ed7e

Please sign in to comment.