Allow actions to be deserialized from JSON
Introduce separate macro for implementing 'internal' actions which are not intended to be loaded from keymaps.
This commit is contained in:
parent
1778622960
commit
fd4b81c8fc
26 changed files with 559 additions and 335 deletions
|
@ -4,15 +4,16 @@ use crate::{mode::NormalState, Mode, SwitchMode, VimState};
|
|||
use editor::{char_kind, movement, Bias};
|
||||
use gpui::{actions, impl_actions, keymap::Binding, MutableAppContext, ViewContext};
|
||||
use language::SelectionGoal;
|
||||
use serde::Deserialize;
|
||||
use workspace::Workspace;
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Deserialize)]
|
||||
struct MoveToNextWordStart(pub bool);
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Deserialize)]
|
||||
struct MoveToNextWordEnd(pub bool);
|
||||
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Deserialize)]
|
||||
struct MoveToPreviousWordStart(pub bool);
|
||||
|
||||
impl_actions!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue