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:
parent
fa19bc98ac
commit
0540291204
4 changed files with 85 additions and 96 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -439,6 +439,7 @@ dependencies = [
|
|||
"semantic_index",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"serde_json_lenient",
|
||||
"settings",
|
||||
"similar",
|
||||
"smol",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue