# editor: Add an option to disable the formatter \(\#48991\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/4a3f891c2fb0dfbd9e92731772d8e508357f011b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 4a3f891c2fb0dfbd9e92731772d8e508357f011b

Requested commit: 4a3f891c2fb0dfbd9e92731772d8e508357f011b

Commit: 4a3f891c2fb0dfbd9e92731772d8e508357f011b

Tree: 114bacd738983223e97dcc0236242227f7b0f141

Author: Xin Zhao

Committer: GitHub

## Message

````
editor: Add an option to disable the formatter (#48991)

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.
```json
"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.

- [x] Tests or screenshots needed?
- [x] Code Reviewed
- [x] Manual QA

Release Notes:

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

## Parents

- [2714e6ea53b182c80529a46e075989699cb5a5c6](https://git.cafe/gitcafe/zed/commit/2714e6ea53b182c80529a46e075989699cb5a5c6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/4a3f891c2fb0dfbd9e92731772d8e508357f011b?format=markdown)
