Cannot for the life of me configure formatting
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
Formatting adds 6 spaces for indentation.
Actual Behaviour
Formatting adds the default 2.
Reproduction steps
I have it set as the default formatter in my settings.json:
"[lua]": {
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
"editor.tabCompletion": "on",
"editor.quickSuggestionsDelay": 1,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.defaultFormatter": "sumneko.lua",
},
I put in .luarc.json in my workspace:
{
"Lua.format.defaultConfig": {
"indent_style": "space",
"indent_size": "6"
}
}
But no luck,
I put in .vscode/settings.json in my workspace:
{
"Lua.format.defaultConfig": {
"indent_style": "space",
"indent_size": "6"
}
}
I try various ways of adding this to the core settings.json used by VSCode, either adding it under the [lua] entry, or as a top level entry, but no luck.
What am I missing?!
thanks!
Additional Notes
No response
Log File
No response
sumneko requires that formatting follows the Language Server Protocol, so indentation will not use the configuration here but will instead follow the editor's configuration.
sumneko requires that formatting follows the Language Server Protocol, so indentation will not use the configuration here but will instead follow the editor's configuration.
Sorry for interrupting the conversation here.
But how do I prevent line breaks from being added when a line is quite long? I don't want to have this behavior, but no configuration seems to work, neither local nor global.
sumneko requires that formatting follows the Language Server Protocol, so indentation will not use the configuration here but will instead follow the editor's configuration.
Sorry for interrupting the conversation here.
But how do I prevent line breaks from being added when a line is quite long? I don't want to have this behavior, but no configuration seems to work, neither local nor global.
set max_line_length=unset
Same problem. Nothing I do on VSCode works when the documentation states it's possible..
Also, VSCode autocompletes with CamelCase instead of snake_case, which is also different from the documentation: