mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-19 00:39:27 +02:00
fix(lsp): double check for documentHighlight. See #3246
This commit is contained in:
parent
a23e8c15f5
commit
0a63734b78
1 changed files with 3 additions and 0 deletions
|
@ -236,6 +236,9 @@ function M.words.setup(opts)
|
||||||
group = vim.api.nvim_create_augroup("lsp_word_" .. buf, { clear = true }),
|
group = vim.api.nvim_create_augroup("lsp_word_" .. buf, { clear = true }),
|
||||||
buffer = buf,
|
buffer = buf,
|
||||||
callback = function(ev)
|
callback = function(ev)
|
||||||
|
if not require("lazyvim.plugins.lsp.keymaps").has(buf, "documentHighlight") then
|
||||||
|
return false
|
||||||
|
end
|
||||||
if not ({ M.words.get() })[2] then
|
if not ({ M.words.get() })[2] then
|
||||||
if ev.event:find("CursorMoved") then
|
if ev.event:find("CursorMoved") then
|
||||||
vim.lsp.buf.clear_references()
|
vim.lsp.buf.clear_references()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue