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:
parent
4c50201036
commit
6aba3950d2
37 changed files with 506 additions and 283 deletions
|
@ -6,7 +6,7 @@ use crate::{
|
|||
};
|
||||
use editor::{movement, scroll::Autoscroll, Bias};
|
||||
use language::BracketPair;
|
||||
use serde::Deserialize;
|
||||
|
||||
use std::sync::Arc;
|
||||
use ui::ViewContext;
|
||||
|
||||
|
@ -17,16 +17,6 @@ pub enum SurroundsType {
|
|||
Selection,
|
||||
}
|
||||
|
||||
// This exists so that we can have Deserialize on Operators, but not on Motions.
|
||||
impl<'de> Deserialize<'de> for SurroundsType {
|
||||
fn deserialize<D>(_: D) -> Result<Self, D::Error>
|
||||
where
|
||||
D: serde::Deserializer<'de>,
|
||||
{
|
||||
Err(serde::de::Error::custom("Cannot deserialize SurroundsType"))
|
||||
}
|
||||
}
|
||||
|
||||
impl Vim {
|
||||
pub fn add_surrounds(
|
||||
&mut self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue