How are you using the lua-language-server?
NeoVim
Which OS are you using?
MacOS
What is the issue affecting?
Semantic tokens
Description of issue
Consider the following Lua snippet:
local foo = {
bar = function() end,
}
Here, bar is marked with the semantic token
- type:
method
- modifier:
declaration
I believe both of these are incorrect: a table key is not a variable nor a declaration -- it's assigning an anonymous variable to a property; so it should be
- type:
property (same as, e.g., baz = 'quux')
- no modifier (also for other table keys)
(Having the bar in foo.bar() be a method is fine, of course.)
How are you using the lua-language-server?
NeoVim
Which OS are you using?
MacOS
What is the issue affecting?
Semantic tokens
Description of issue
Consider the following Lua snippet:
Here,
baris marked with the semantic tokenmethoddeclarationI believe both of these are incorrect: a table key is not a variable nor a declaration -- it's assigning an anonymous variable to a property; so it should be
property(same as, e.g.,baz = 'quux')(Having the
barinfoo.bar()be amethodis fine, of course.)