Open
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?
Completion
Expected Behaviour
When providing an alias for a function in a table, the alias should be treated as a function.
Actual Behaviour
When providing an alias for a function in a table, the alias is treated as a field and does not get completed as a function. Hover shows that the field is a function, but completion does not agree or complete with parentheses.
Reproduction steps
- Use the below code
---@class myTable
local t = {}
---Does a thing
---@param a integer
---@param b string
---@param c boolean
function t.myFunc(a, b, c) end
t.myAlias = t.myFunc
- Try to get completions for the function
t.myAlias
Additional Notes
This would be incredibly useful for aliasing a function — something that luassert does a lot.
Log File
No response