Improve keymap json schema (#23044)
Also: * Adds `impl_internal_actions!` for deriving the `Action` trait without registering. * Removes some deserializers that immediately fail in favor of `#[serde(skip)]` on fields where they were used. This also omits them from the schema. Release Notes: - Keymap settings file now has more JSON schema information to inform `json-language-server` completions and info, particularly for actions that take input.
This commit is contained in:
@@ -10,6 +10,7 @@ use gpui::{
|
||||
};
|
||||
use picker::{Picker, PickerDelegate};
|
||||
use project::Project;
|
||||
use schemars::JsonSchema;
|
||||
use serde::Deserialize;
|
||||
use settings::Settings;
|
||||
use std::sync::Arc;
|
||||
@@ -23,7 +24,7 @@ use workspace::{
|
||||
|
||||
const PANEL_WIDTH_REMS: f32 = 28.;
|
||||
|
||||
#[derive(PartialEq, Clone, Deserialize, Default)]
|
||||
#[derive(PartialEq, Clone, Deserialize, JsonSchema, Default)]
|
||||
pub struct Toggle {
|
||||
#[serde(default)]
|
||||
pub select_last: bool,
|
||||
|
||||
Reference in New Issue
Block a user