1
0
Fork 0

nvim: fix lsp highlights

amora already provides highlights for it, add CursorMovedI
This commit is contained in:
tastytea 2022-08-17 23:34:09 +02:00
parent 13db26327a
commit bc76c90cff
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
1 changed files with 1 additions and 6 deletions

View File

@ -29,11 +29,6 @@ local on_attach = function(client, bufnr)
-- highlight symbol under cursor
if client.resolved_capabilities.document_highlight then
vim.cmd [[
execute "hi! LspReferenceRead cterm=bold ctermbg=".g:amora#palette.comment[1]." guibg=".g:amora#palette.comment[0]
execute "hi! LspReferenceText cterm=bold ctermbg=".g:amora#palette.comment[1]." guibg=".g:amora#palette.comment[0]
execute "hi! LspReferenceWrite cterm=bold ctermbg=".g:amora#palette.comment[1]." guibg=".g:amora#palette.comment[0]
]]
vim.api.nvim_create_augroup('config_lsp', { clear = false })
vim.api.nvim_clear_autocmds({
buffer = bufnr,
@ -44,7 +39,7 @@ local on_attach = function(client, bufnr)
buffer = bufnr,
callback = vim.lsp.buf.document_highlight,
})
vim.api.nvim_create_autocmd('CursorMoved', {
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
group = 'config_lsp',
buffer = bufnr,
callback = vim.lsp.buf.clear_references,