Open frankitox opened 1 week ago
I think this is expected since Document Highlight is more like a quick fuzzy glance for all related code. If the variable is defined hundreds lines above the usage, you cannot highlight it anyway because it's out of the screen.
You can always use precise "Goto Definition" and/or "References" to get a complete list.
Hi! I'm using nil via vim + neovim/nvim-lspconfig. It's working pretty well, but once in a while I try to use
:lua vim.lsp.buf.document_highlight()
which highlights the variable that's on the cursor. This works in simple code, but the more complex it gets, the less likely I'll see all the references. Here's two examples that differ in only one line: