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:
Sanchayan Maity 2023-01-04 13:54:49 +05:30
parent 8b6cf82abe
commit 0c9e0eb164
Signed by: sanchayanmaity
GPG Key ID: 6F6A0609C12038F3
1 changed files with 3 additions and 0 deletions

View File

@ -157,6 +157,9 @@ local on_attach = function(client, bufnr)
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 then
vim.api.nvim_create_autocmd({"CursorHold", "CursorHoldI", "InsertLeave"}, {