LuaLS / LuaLS/lua-language-server

Feature Request Hover Alias Original and Expanded

Open
#2,376 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

Currently there is an option Lua > Hover > Expand Alias that allows defining an alias and instead of seeing the alias-name when using the alias you will see what the alias is made of so `---@alias myType boolean | number` will appear as `boolean | number` instead of `myType`. However, there are circumstances where knowing what the alias is but also what it is made of can be useful. Is there a way we can have a both option here where on hover we can see both the alias name and its expansion? Something like `myType - (boolean | number)`

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Lua > Hover > Expand Alias setting and trace the hover rendering for type aliases. Add a mode that displays both the alias name and its expansion, such as `myType - (boolean | number)`, and verify that existing alias display modes remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.