LuaLS / LuaLS/lua-language-server
Indentation when formatting off for values inside square brackets
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?
Other (Defold's built-in text editor)
Which OS are you using?
Linux (also happens on other platforms)
What is the issue affecting?
Formatting
Expected Behaviour
Hello, thank you for LuaLS!
There is a small issue that we have found when formatting a Lua file and indentation;
local v = t[
key(1)
]
Actual Behaviour
This is how the formatter leaves it;
local v = t[
key(1)
]
Reproduction steps
https://github.com/defold/defold/pull/12995
- In the Defold Editor's text editor, in a Lua script file, type
local v = t[
key(1)
]
- Run the document formatter function with
Alt+Shift+For from the top menuEdit > Format Document/Selection key(1)falls back to previous column
Additional Notes
No response
Log File
No response
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 Defolds integriertem Texteditor mit dem Lua-Snippet und dem Befehl Format Document und verfolge anschließend den LuaLS-Formatierungspfad, der Ausdrücke innerhalb eckiger Klammern verarbeitet. Als abgeschlossen gilt die Formatierung, wenn die Einrückung vor key(1) erhalten bleibt, auch in der verknüpften Defold-Reproduktion.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100