nvim: lsp: Disable semantic token highlighting
It produces somewhat bad syntax highlighting in some cases. For example, in typescript, the variable and it's type annotation get the same colour.
This commit is contained in:
parent
8b6cf82abe
commit
0c9e0eb164
1 changed files with 3 additions and 0 deletions
|
@ -157,6 +157,9 @@ local on_attach = function(client, bufnr)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Opt out of semantic highlighting
|
||||||
|
client.server_capabilities.semanticTokensProvider = nil
|
||||||
|
|
||||||
if client.server_capabilities.codeLensProvider or client.server_capabilities.documentHighlightProvider then
|
if client.server_capabilities.codeLensProvider or client.server_capabilities.documentHighlightProvider then
|
||||||
if client.server_capabilities.codeLensProvider then
|
if client.server_capabilities.codeLensProvider then
|
||||||
vim.api.nvim_create_autocmd({"CursorHold", "CursorHoldI", "InsertLeave"}, {
|
vim.api.nvim_create_autocmd({"CursorHold", "CursorHoldI", "InsertLeave"}, {
|
||||||
|
|
Loading…
Reference in a new issue