How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
MacOS
What is the issue affecting?
Formatting
Expected Behaviour
The next line should be indented with the following code
do
for i = 1, 10 do<enter>
Actual Behaviour
The next line indented correctly initially (according to the indentationRules.increaseIndentPattern), but then it get removed by luals's "auto-fix-indent"...
Reproduction steps
- create a new file
- write the code snippet provided above
- then press
enter and observe the behaviour
Additional Notes
I disabled the fix-indent by modifying luals code locally, and this bug stopped. So it's related to the fix-indent function added recently.
I add a do return end here to disable it:
|
return function (uri, changes) |
|
if not client.getOption('fixIndents') then |
As discussed in here #2786, these new indentation behaviours are somewhat annoying and may not be applicable for all of us. Can this be made as optional please 🥲 ? Say an option which can be turned on/off.
Log File
No response
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
MacOS
What is the issue affecting?
Formatting
Expected Behaviour
The next line should be indented with the following code
Actual Behaviour
The next line indented correctly initially (according to the
indentationRules.increaseIndentPattern), but then it get removed by luals's "auto-fix-indent"...Reproduction steps
enterand observe the behaviourAdditional Notes
I disabled the
fix-indentby modifying luals code locally, and this bug stopped. So it's related to thefix-indentfunction added recently.I add a
do return endhere to disable it:lua-language-server/script/core/fix-indent.lua
Lines 194 to 195 in 01c6b61
As discussed in here #2786, these new indentation behaviours are somewhat annoying and may not be applicable for all of us. Can this be made as optional please 🥲 ? Say an option which can be turned on/off.
Log File
No response