From dcffbf9a71be602c9aee6956d171c7fa9ff3c164 Mon Sep 17 00:00:00 2001 From: jdhao Date: Tue, 28 Dec 2021 23:49:43 +0800 Subject: fix: lsp reference highlight isn't correctly linked ! is need to overwrite possible existing highlight group of the same name. --- lua/config/lsp.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua/config') diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index 585ec9a..fa16f97 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -50,9 +50,9 @@ local custom_attach = function(client, bufnr) -- The blow command will highlight the current variable and its usages in the buffer. if client.resolved_capabilities.document_highlight then vim.cmd([[ - hi link LspReferenceRead Visual - hi link LspReferenceText Visual - hi link LspReferenceWrite Visual + hi! link LspReferenceRead Visual + hi! link LspReferenceText Visual + hi! link LspReferenceWrite Visual augroup lsp_document_highlight autocmd! * autocmd CursorHold lua vim.lsp.buf.document_highlight() -- cgit v1.2.3