Skip to content

editor: Add an option to disable the formatter#48991

Merged
Veykril merged 3 commits intozed-industries:mainfrom
lingyaochu:formatter
Mar 17, 2026
Merged

editor: Add an option to disable the formatter#48991
Veykril merged 3 commits intozed-industries:mainfrom
lingyaochu:formatter

Conversation

@lingyaochu
Copy link
Copy Markdown
Contributor

@lingyaochu lingyaochu commented Feb 12, 2026

Related issue #48600, following #48904

Setting "formatter": null does not actually disable the formatter, as it is functionally equivalent to leaving the setting undefined. In this case, Zed falls back to the default behavior—either "auto" or a specific language server, depending on the language.

This PR adds a "none" option to the formatter setting, allowing users to explicitly disable formatting while keeping code_actions_on_format enabled separately.

"formatter": "none"

I still have some doubts about the necessity of this setting itself, but if it is a desired addition, I will update the documentation accordingly. If not, please feel free to close this PR.

  • Tests or screenshots needed?
  • Code Reviewed
  • Manual QA

Release Notes:

  • Added "formatter": "none" in settings to explicitly disable the formatter.

Copy link
Copy Markdown
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Veykril Veykril assigned Veykril and unassigned miguelraz and yeskunall Mar 17, 2026
@Veykril Veykril enabled auto-merge (squash) March 17, 2026 07:26
@jrmajor
Copy link
Copy Markdown

jrmajor commented Mar 17, 2026

This would be worth mentioning in release notes.

@lingyaochu
Copy link
Copy Markdown
Contributor Author

It looks like the CI hasn't kicked off yet, so I'm going to quickly add the docs and release notes now. Hope this doesn't disrupt the review process!

@Veykril Veykril disabled auto-merge March 17, 2026 08:04
@Veykril
Copy link
Copy Markdown
Member

Veykril commented Mar 17, 2026

yea looks like CI got stuck, will merge after your changes then

@lingyaochu
Copy link
Copy Markdown
Contributor Author

Should be better now.

@lingyaochu lingyaochu requested a review from Veykril March 17, 2026 08:37
@Veykril Veykril enabled auto-merge (squash) March 17, 2026 09:05
@Veykril Veykril merged commit 4a3f891 into zed-industries:main Mar 17, 2026
29 checks passed
@lingyaochu lingyaochu deleted the formatter branch March 17, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement community champion Issues filed by our amazing community champions! 🫶

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants