settings: Introduce PRESERVED_KEYS to write default values (#15474)
This adds the optional `PRESERVED_KEYS` constant to the `Settings` trait, which allows users of the trait to specify which keys should be written to the settings file, even if their current value matches the default value. That's useful for tagged settings that have, for example, a `"version"` field that should always be present in the user settings file, so we can then reparse the user settings based on the version. Co-Authored-By: Thorsten <thorsten@zed.dev> Release Notes: - N/A --------- Co-authored-by: Thorsten <thorsten@zed.dev>
This commit is contained in:
co-authored by
Thorsten
parent
fa19bc98ac
commit
0540291204
Generated
+1
@@ -439,6 +439,7 @@ dependencies = [
|
||||
"semantic_index",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_json_lenient",
|
||||
"settings",
|
||||
"similar",
|
||||
"smol",
|
||||
|
||||
Reference in New Issue
Block a user