LuaLS / LuaLS/lua-language-server
When a parameter for a function is defined as `fun(param:type)`, the auto-complete when you're using that function stops working beyond typing "fun"
Open
Nobody has claimed this yet.
as designed
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
For example, having a function defined as:
---@param callback fun(text:string)
local function my_fun(callback)
callback()
end
When you go to call it using my_fun(), the auto-completer suggests "fun(text:string), but if you start typing func the auto-completer loses the suggestion.


Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the autocomplete behavior with the Lua annotation and function call shown in the issue, then trace the language server's completion handling for function-type annotations. Done means the fun(text:string) suggestion remains available as the call is typed beyond fun; the payload does not name a file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100