settings: Use a derive macro for refine (#38451)

When we refactored settings to not pass JSON blobs around, we ended up
needing
to write *a lot* of code that just merged things (like json merge used
to do).

Use a derive macro to prevent typos in this logic.

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin
2025-09-18 21:13:49 +00:00
committed by GitHub
parent 5f4f0a873e
commit b09764c54a
74 changed files with 1089 additions and 2818 deletions
+4 -4
View File
@@ -269,15 +269,15 @@ async fn test_language_for_file_with_custom_file_types(cx: &mut TestAppContext)
cx.update(|cx| {
init_settings(cx, |settings| {
settings.file_types.extend([
("TypeScript".into(), vec!["js".into()]),
("TypeScript".into(), vec!["js".into()].into()),
(
"JavaScript".into(),
vec!["*longer.ts".into(), "ecmascript".into()],
vec!["*longer.ts".into(), "ecmascript".into()].into(),
),
("C++".into(), vec!["c".into(), "*.dev".into()]),
("C++".into(), vec!["c".into(), "*.dev".into()].into()),
(
"Dockerfile".into(),
vec!["Dockerfile".into(), "Dockerfile.*".into()],
vec!["Dockerfile".into(), "Dockerfile.*".into()].into(),
),
]);
})