-
-
Notifications
You must be signed in to change notification settings - Fork 399
Closed as duplicate of#3178
Description
How are you using the lua-language-server?
NeoVim
Which OS are you using?
Linux
What is the issue affecting?
Type Checking
Expected Behaviour
LuaLS correctly autocompletes a string value according to annotation, then doesn't complain about it.
Actual Behaviour
LuaLS correctly autocompletes a string value according to annotation, but then claims it's of a wrong type.
Happens only to values that aren't visible on the collapsed list, e.g. return, clear, a, b, c all work fine, but not escape, print, power, euro, etc.
Reproduction steps
- install
love(or anything with a long list of constants) - open
example.lua(below) - go to
foo()call - autocomplete parameter, e.g.
escape
Additional Notes
-- example.lua
love = require('love')
---@param bar love.KeyConstant
function foo(bar) -- checking `bar` type returns entire list, including "escape"
print(bar)
end
foo('escape') -- LuaLS correctly autocompletes "escape" hereThe error happens for every value that isn't visible on a collapsed list from the screenshot, I think.
Log File
Metadata
Metadata
Assignees
Labels
No labels
