LuaLS / LuaLS/lua-language-server
Shorten tooltip for multiple return values
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
I'm writing functions that return multiple return values, sometimes up to 16. I'm finding the tooltip in vscode tricky to read, as it prints the return types one per line, like:
```lua
function foo()
-> number
2. number
3. number
4. number
5. number
6. number
7. number
8. number
9. number
```
I'd love an option to keep them all on the same line
```lua
function foo()
-> number, number, number, number, number, number, number, number, number
```
Or to use a more minimal syntax
```lua
function foo()
-> number (9)
```
Contributor guide
Research direction
Start by reproducing the tooltip in VS Code for a Lua function with many return values, then locate the language-server code responsible for formatting function return types. Compare the requested single-line and count-based formats and establish which presentation or option should be supported; done means long return lists are readable without changing their meaning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100