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:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user