From bc76c90cff31c1646fa29d918b80785f47583f02 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 17 Aug 2022 23:34:09 +0200 Subject: [PATCH] nvim: fix lsp highlights amora already provides highlights for it, add CursorMovedI --- .config/nvim/lua/my/lsp.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.config/nvim/lua/my/lsp.lua b/.config/nvim/lua/my/lsp.lua index 4fad2bf..ae0ca0b 100644 --- a/.config/nvim/lua/my/lsp.lua +++ b/.config/nvim/lua/my/lsp.lua @@ -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,