Indentation (tabs vs. spaces) with lsp-format-buffer
and lua-mode
#3980
-
Thank you for the bug report
Bug description
Steps to reproduceTake this example: function foo()
print('foo')
end With point at line 2, But if I let lua-language-server format the buffer with 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 behaviorIndentation of Which Language Server did you use?lua-language-server OSLinux Error callstackNo response Anything else?No response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We use lua-indent-level to get the tab size. (see https://github.com/yyoncho/lsp-mode/blob/inlay-hints/lsp-mode.el#L5910 ) |
Beta Was this translation helpful? Give feedback.
We use lua-indent-level to get the tab size. (see https://github.com/yyoncho/lsp-mode/blob/inlay-hints/lsp-mode.el#L5910 )
We use indent-tabs-mode to determine whether to ask the server to indent with tabs or not.