diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index 24a2bc98..adc1be0d 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -236,6 +236,9 @@ function M.words.setup(opts) group = vim.api.nvim_create_augroup("lsp_word_" .. buf, { clear = true }), buffer = buf, 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 ev.event:find("CursorMoved") then vim.lsp.buf.clear_references()