remove document highlight from server capabilities
This commit is contained in:
parent
027c0c81f3
commit
65a01e8caa
1 changed files with 0 additions and 14 deletions
14
lua/lsp.lua
14
lua/lsp.lua
|
@ -21,20 +21,6 @@ local on_attach = function(client, bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
client.server_capabilities.semanticTokensProvider = nil
|
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
|
end
|
||||||
|
|
||||||
local nvim_lsp = require('lspconfig')
|
local nvim_lsp = require('lspconfig')
|
||||||
|
|
Loading…
Reference in a new issue