Indentation when formatting off for values inside square brackets
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Reproduce the issue in Defold's built-in text editor using the Lua snippet and the Format Document command, then trace the LuaLS formatting path that handles expressions inside square brackets. Done means formatting preserves the indentation before key(1), including in the linked Defold reproduction.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 1
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.
More from LuaLS/lua-language-server
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
LuaLS/lua-language-server#1776 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
LuaLS/lua-language-server#3463 · 5 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
LuaLS/lua-language-server#3461 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
LuaLS/lua-language-server#3459 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
LuaLS/lua-language-server#3456 ·
All issues in LuaLS/lua-language-server
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LandSandBoat/server#11579 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ArchiveTeam/sinavideo-grab#7 · 3 reactions ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
mailcow/mailcow-dockerized#7480 ·
-
mapper bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100