Deny unknown keys in settings in JSON schema so user gets warnings but settings still parses (#30583)
Closes #ISSUE Release Notes: - Improved checking of Zed settings so that unrecognized keys show warnings while editing them
This commit is contained in:
parent
986d271ea7
commit
ab455e1c43
7 changed files with 18 additions and 2 deletions
|
@ -28,6 +28,7 @@ pub struct ChatPanelSettings {
|
|||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
||||
#[schemars(deny_unknown_fields)]
|
||||
pub struct ChatPanelSettingsContent {
|
||||
/// When to show the panel button in the status bar.
|
||||
///
|
||||
|
@ -51,6 +52,7 @@ pub struct NotificationPanelSettings {
|
|||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
||||
#[schemars(deny_unknown_fields)]
|
||||
pub struct PanelSettingsContent {
|
||||
/// Whether to show the panel button in the status bar.
|
||||
///
|
||||
|
@ -67,6 +69,7 @@ pub struct PanelSettingsContent {
|
|||
}
|
||||
|
||||
#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
|
||||
#[schemars(deny_unknown_fields)]
|
||||
pub struct MessageEditorSettings {
|
||||
/// Whether to automatically replace emoji shortcodes with emoji characters.
|
||||
/// For example: typing `:wave:` gets replaced with `👋`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue