-
-
Notifications
You must be signed in to change notification settings - Fork 391
Closed
Description
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Type Checking
Expected Behaviour
When defining a file like
---@class Promise
Promise = {}
---@generic T
---@param func fun(value: T)
function Promise:and_then(func) end
---@param entity integer
---@return Promise<string?>
function get_name(entity) end
local name_promise = get_name(1)The LSP should be able to tell that name is of type Promise<string?>
Actual Behaviour
The LSP is able to identify the type of name, however, it doesn't show the fields/methods of the class, and it doesn't infer anything about it either, ie, building from the example above
name:and_then(
function(value)
print(value)
end
)The LSP should be able to infer that value should be of type string?
Reproduction steps
Simply type in the code as shown above
Additional Notes
No response
Log File
No response
Metadata
Metadata
Assignees
Labels
No labels