LuaLS / LuaLS/lua-language-server
@alias comments aren't visible
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Lua
- Sterne
- 4.4k
- Forks
- 442
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Annotations, Hover
Expected Behaviour
a comment to an alias type should be shown as regular comment to a parameter would be shown (at least if there is no comment to the @param annotation itself). The hover message should read:
function f(arg: string)
@param arg — comment from alias
Unused functions.Lua Diagnostics.(unused-function)
Unused local `f`.Lua Diagnostics.(unused-local)
Actual Behaviour
the comment to the alias type isn't shown. the hover message is:
function f(arg: string)
Unused functions.Lua Diagnostics.(unused-function)
Unused local `f`.Lua Diagnostics.(unused-local)
Reproduction steps
- cat << EOF > file.lua
---@alias t_arg string comment from alias
---@param arg t_arg
local function f(arg)
end
EOF - code file.lua
- hover over the function name and read message
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere das Problem in file.lua anhand der gezeigten @alias- und @param-Annotationen und untersuche anschließend den Hover-Einstiegspunkt für die Funktionsdokumentation. Fertig ist die Änderung, wenn beim Überfahren von f der Alias-Kommentar als @param arg enthalten ist, die bestehenden Diagnosen erhalten bleiben und jeder explizite @param-Kommentar berücksichtigt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100