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:
Max Brunsfeld
2022-04-08 15:47:51 -07:00
parent 1778622960
commit fd4b81c8fc
26 changed files with 558 additions and 334 deletions
+4 -3
View File
@@ -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!(