Skip to content

Commit

Permalink
Make syntax highlighting consistent between semantic/treesitter
Browse files Browse the repository at this point in the history
I'm not sure why they're different, but making all the @Lsp.* groups
linked to the treesitter groups grants consistent colours.

From https://gist.github.com/swarn/fb37d9eefe1bc616c2a7e476c0bc0316#changing-highlights
  • Loading branch information
ellsclytn committed Apr 11, 2023
1 parent 95dbd95 commit 3755c1c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions config/nvim/lua/_onedark.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,24 @@ return function()
})

onedark.load()

local links = {
['@lsp.type.namespace'] = '@namespace',
['@lsp.type.type'] = '@type',
['@lsp.type.class'] = '@type',
['@lsp.type.enum'] = '@type',
['@lsp.type.interface'] = '@type',
['@lsp.type.struct'] = '@structure',
['@lsp.type.parameter'] = '@parameter',
['@lsp.type.variable'] = '@variable',
['@lsp.type.property'] = '@property',
['@lsp.type.enumMember'] = '@constant',
['@lsp.type.function'] = '@function',
['@lsp.type.method'] = '@method',
['@lsp.type.macro'] = '@macro',
['@lsp.type.decorator'] = '@function',
}
for newgroup, oldgroup in pairs(links) do
vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true })
end
end

0 comments on commit 3755c1c

Please sign in to comment.