Skip to content

Commit

Permalink
semantic token mostly looks okay
Browse files Browse the repository at this point in the history
  • Loading branch information
chomosuke committed Apr 15, 2023
1 parent dd640f6 commit b9928ec
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions lua/onedark/highlights.lua
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,30 @@ if vim.api.nvim_call_function("has", { "nvim-0.8" }) == 1 then
["@variable"] = {fg = c.fg, fmt = cfg.code_style.variables},
["@variable.builtin"] = {fg = c.red, fmt = cfg.code_style.variables},
}
if vim.api.nvim_call_function("has", { "nvim-0.9" }) == 1 then
hl.lsp = {
["@lsp.type.comment"] = hl.treesitter[ "@comment"],
["@lsp.type.enum"] = hl.treesitter["@type"],
["@lsp.type.enumMember"] = hl.treesitter["@constant.builtin"],
["@lsp.type.interface"] = hl.treesitter["@variable.builtin"],
["@lsp.type.keyword"] = hl.treesitter["@keyword"],
["@lsp.type.namespace"] = hl.treesitter["@namespace"],
["@lsp.type.parameter"] = hl.treesitter["@parameter"],
["@lsp.type.property"] = hl.treesitter["@property"],
["@lsp.type.variable"] = hl.treesitter["@variable"],
["@lsp.type.macro"] = hl.treesitter["@function.macro"],
["@lsp.type.method"] = hl.treesitter["@method"],
["@lsp.type.number"] = hl.treesitter["@number"],
["@lsp.type.generic"] = hl.treesitter["@text"],
["@lsp.type.builtinType"] = hl.treesitter["@type.builtin"],
["@lsp.typemod.method.defaultLibrary"] = hl.treesitter["@function"],
["@lsp.typemod.function.defaultLibrary"] = hl.treesitter["@function"],
["@lsp.typemod.operator.injected"] = hl.treesitter["@operator"],
["@lsp.typemod.string.injected"] = hl.treesitter["@string"],
["@lsp.typemod.variable.defaultLibrary"] = hl.treesitter["@variable.builtin"],
["@lsp.typemod.variable.injected"] = hl.treesitter["@variable"],
}
end
else
hl.treesitter = {
TSAnnotation = colors.Fg,
Expand Down Expand Up @@ -716,6 +740,9 @@ function M.setup()
vim_highlights(hl.common)
vim_highlights(hl.syntax)
vim_highlights(hl.treesitter)
if hl.lsp then
vim_highlights(hl.lsp)
end
for _, group in pairs(hl.langs) do vim_highlights(group) end
for _, group in pairs(hl.plugins) do vim_highlights(group) end

Expand Down

0 comments on commit b9928ec

Please sign in to comment.