Fix migration from #40409 for users who haven't been migrated yet (#40916)

Closes #40874

Release Notes:

- Fixed an issue where migrating settings after v0.208.5+ would
spuriously enable prettier. This fix only affects those who have not
updated or migrated yet. For those who have already updated to version
v0.208.5 or later, placing `"formatter": []` in your settings in the
affected languages will fix the issue.

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Ben Kunkle
2025-10-22 18:17:01 +00:00
committed by GitHub
co-authored by Mikayla
parent c60343af71
commit cb7881ec0b
2 changed files with 6 additions and 4 deletions
@@ -58,7 +58,7 @@ fn restore_code_actions_on_format_inner(value: &mut Value, path: &[&str]) -> Res
.map(|code_action| (code_action, Value::Bool(true))),
);
obj.remove("formatter");
obj.insert("formatter".to_string(), Value::Array(vec![]));
obj.insert(
"code_actions_on_format".into(),
Value::Object(code_actions_map),
+5 -3
View File
@@ -2016,9 +2016,9 @@ mod tests {
&r#"{
"code_actions_on_format": {
"foo": true
}
}
"#
},
"formatter": []
}"#
.unindent(),
),
);
@@ -2053,6 +2053,7 @@ mod tests {
.unindent(),
Some(
&r#"{
"formatter": [],
"code_actions_on_format": {
"foo": true,
"bar": true,
@@ -2080,6 +2081,7 @@ mod tests {
.unindent(),
Some(
&r#"{
"formatter": [],
"code_actions_on_format": {
"foo": true,
"qux": true,