change standard formatting for JS #8217
-
Is there a way to edit the lsp settings for js formatting? It's a bit too aggressive to me... thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
See general overview of Zed's formatter capabilities and the settings: #7951 (reply in thread) Quick recap: First, you have to understand what is a Prettier is configured with |
Beta Was this translation helpful? Give feedback.
-
Oh.. that's too easy to understand at first ;) |
Beta Was this translation helpful? Give feedback.
See general overview of Zed's formatter capabilities and the settings: #7951 (reply in thread)
Quick recap:
First, you have to understand what is a
formatter
setting in your settings set to.If there's none, then the default value would be
auto
, which tries to format the buffer withprettier
(if applicable to your current language which unfortunately is not mentioned in the question) or, otherwise, tries to format the buffer with the language server formatting.Prettier is configured with
"prettier"
section with https://prettier.io/docs/en/configuration , each language server is configured differently and it's better to consult its docs.