LuaLS / LuaLS/lua-language-server
Shorten tooltip for multiple return values
Nobody has claimed this yet.
- 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
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
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