-
-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
How are you using the lua-language-server?
NeoVim
Which OS are you using?
Linux
What is the issue affecting?
Other
Expected Behaviour
Only instances of the variable I ran vim.lsp.buf.document_highlight()
on should be highlighted with LspReferenceRead
or LspReferenceWrite
(I'm not sure whether LspReferenceText
is used). Thus, foo
shouln't be highlighted (see the images in the next section).
Actual Behaviour
Somehow foo
is also highlighted with LspReferenceWrite
(LspReferenceWrite
= blue bg, LspReferenceRead
= green bg, LspReferenceText
= red bg).
However, if I add a line after foo
gets initialized where foo
gets another value, the highlighting is correct.
If I read foo
instead of writing it the highlighting is still wrong.
Reproduction steps
- Create a test file
test.lua
- Open the test file and past the following text:
local zing = foo
local foo = 4
local bar = {
baz = foo
}
bar.baz = 5
print(bar.baz)
- Activate the language-server
- Activate document highlight with the field
baz
. In nvim place the cursor over the fieldbaz
and run:lua vim.lsp.buf.document_highlight()
. - Make sure the your hl colors for
LspReference...
are distinguishable from the rest.
Additional Notes
No response
Log File
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working