Thank you for the bug report
Bug description
lua-mode in default configuration uses spaces for indentation, but (lsp-format-buffer) uses tabs.
Steps to reproduce
Take this example:
function foo()
print('foo')
end
With point at line 2, (indent-for-tab-command) indents this line by 3 spaces, because lua-indent-level is set to 3. This verifies that lua-mode is using spaces and not tabs (in the default configuration).
But if I let lua-language-server format the buffer with (lsp-format-buffer), the second line gets indented by one tab and not by 3 spaces.
If I understand correctly lua-language-server does not decide by itself whether to use spaces or tabs for indentation, but gets this information from the client.
Expected behavior
Indentation of lua-mode and (lsp-format-buffer) should be the same.
Which Language Server did you use?
lua-language-server
OS
Linux
Error callstack
No response
Anything else?
No response
Thank you for the bug report
lsp-moderelated packages.M-x lsp-start-plainBug description
lua-modein default configuration uses spaces for indentation, but(lsp-format-buffer)uses tabs.Steps to reproduce
Take this example:
With point at line 2,
(indent-for-tab-command)indents this line by 3 spaces, becauselua-indent-levelis set to 3. This verifies that lua-mode is using spaces and not tabs (in the default configuration).But if I let lua-language-server format the buffer with
(lsp-format-buffer), the second line gets indented by one tab and not by 3 spaces.If I understand correctly lua-language-server does not decide by itself whether to use spaces or tabs for indentation, but gets this information from the client.
Expected behavior
Indentation of
lua-modeand(lsp-format-buffer)should be the same.Which Language Server did you use?
lua-language-server
OS
Linux
Error callstack
No response
Anything else?
No response