remove document highlight from server capabilities

This commit is contained in:
Vladan Popovic 2024-02-25 22:44:02 +01:00
parent 027c0c81f3
commit 65a01e8caa

View file

@ -21,20 +21,6 @@ local on_attach = function(client, bufnr)
end
client.server_capabilities.semanticTokensProvider = nil
-- Set autocommands conditional on server_capabilities
if client.server_capabilities.document_highlight then
vim.api.nvim_exec([[
hi LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow
hi LspReferenceText cterm=bold ctermbg=red guibg=LightYellow
hi LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow
augroup lsp_document_highlight
autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END
]], false)
end
end
local nvim_lsp = require('lspconfig')