nvim: fix lsp highlights
amora already provides highlights for it, add CursorMovedI
This commit is contained in:
parent
13db26327a
commit
bc76c90cff
|
@ -29,11 +29,6 @@ local on_attach = function(client, bufnr)
|
||||||
|
|
||||||
-- highlight symbol under cursor
|
-- highlight symbol under cursor
|
||||||
if client.resolved_capabilities.document_highlight then
|
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_create_augroup('config_lsp', { clear = false })
|
||||||
vim.api.nvim_clear_autocmds({
|
vim.api.nvim_clear_autocmds({
|
||||||
buffer = bufnr,
|
buffer = bufnr,
|
||||||
|
@ -44,7 +39,7 @@ local on_attach = function(client, bufnr)
|
||||||
buffer = bufnr,
|
buffer = bufnr,
|
||||||
callback = vim.lsp.buf.document_highlight,
|
callback = vim.lsp.buf.document_highlight,
|
||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd('CursorMoved', {
|
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
|
||||||
group = 'config_lsp',
|
group = 'config_lsp',
|
||||||
buffer = bufnr,
|
buffer = bufnr,
|
||||||
callback = vim.lsp.buf.clear_references,
|
callback = vim.lsp.buf.clear_references,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user