Don't allow formatters in format on save (#39400)

Closes #ISSUE



Release Notes:

- settings: Removed support for having format steps in both the
`format_on_save` and `formatter` settings for languages.
`format_on_save` is now restricted to the values of `"on"` and `"off"`,
and all format steps should be set under the `formatter` key. If you
were using `format_on_save` but not `formatter` this will be migrated
for you, otherwise it will require a manual migration.

---------

Co-authored-by: Smit <smit@zed.dev>
This commit is contained in:
Ben Kunkle
2025-10-02 20:34:31 +00:00
committed by GitHub
co-authored by Smit
parent bf48a95344
commit 4c35274b6e
6 changed files with 229 additions and 100 deletions
-1
View File
@@ -1366,7 +1366,6 @@ impl LocalLspStore {
let formatters = match (trigger, &settings.format_on_save) {
(FormatTrigger::Save, FormatOnSave::Off) => &[],
(FormatTrigger::Save, FormatOnSave::List(formatters)) => formatters.as_ref(),
(FormatTrigger::Manual, _) | (FormatTrigger::Save, FormatOnSave::On) => {
match &settings.formatter {
SelectedFormatter::Auto => {