aboutsummaryrefslogtreecommitdiff
path: root/lua/config
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-12-28 23:49:43 +0800
committerjdhao <jdhao@hotmail.com>2021-12-28 23:49:43 +0800
commitdcffbf9a71be602c9aee6956d171c7fa9ff3c164 (patch)
tree9ef9445810490ca01cd9a4155775a349764b2d49 /lua/config
parent85de00f3746fb24f6037788a13de891ae272f9ac (diff)
fix: lsp reference highlight isn't correctly linked
! is need to overwrite possible existing highlight group of the same name.
Diffstat (limited to 'lua/config')
-rw-r--r--lua/config/lsp.lua6
1 files changed, 3 insertions, 3 deletions
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! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()