LuaLS / LuaLS/lua-language-server
Collapsing of functions in the editor breaks if there is a comment before and after the function declaration
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Lua
- Sterne
- 4.4k
- Forks
- 442
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
VSCode with sumneko.lua 3.7.4
Reproducer:
```
-- foo
function foo() -- foo
if a then
return a
end
end
```
This code shows two collapsing/folding indicators to the left, one for the if (expected) and one for the comment (unexpected), but none for the function itself:

Clicking the first folding icon results in this:

It looks like it thinks the two comments belong to one comment block for the function instead of being unrelated comments.
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
Beginne damit, das Folding-Verhalten in VSCode mit dem bereitgestellten Lua-Beispiel nachzustellen, und vergleiche die Indikatoren bei den Kommentaren, der Funktion und dem if-Block. Als erledigt gilt es, wenn die Kommentare getrennt bleiben und die Funktion ihren erwarteten Folding-Indikator erhält, ohne das Folding-Verhalten des if-Blocks zu beeinträchtigen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua, vscode
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100