Skip to content

Make lsp-format-buffer respect editorconfig #3308

Answered by kiennq
mangkoran asked this question in Q&A
Discussion options

You must be logged in to vote

lsp-mode get the indentation width from lsp--formatting-indent-alist.
If you can find which indentation variable web-mode is using and editorconfig is modifying, you can add that to the alist and lsp-mode will ask the language server to format the buffer with the correct width.
Note that, it also depends on the language server to support indentation width or not.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mangkoran
Comment options

Answer selected by mangkoran
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants