mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
fix: lsp reference highlight isn't correctly linked
! is need to overwrite possible existing highlight group of the same name.
This commit is contained in:
parent
85de00f374
commit
dcffbf9a71
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user