pub struct TuiKeysConfig {
pub raw: Table,
}Expand description
[tui.keys] — user-facing override table for the TUI keymap.
Two kinds of entry live side by side, disambiguated by value type (issue #219):
- array value → a global
View::Listverb, e.g.quit = ["q"]. Resolved bySelf::resolved_keymapinto acrate::tui::keymap::Keymap. - table value → a contextual modal sub-table, e.g.
[tui.keys.modal.confirm]or[tui.keys.modal.link.choose_target]. Resolved bySelf::resolved_modal_keymapinto acrate::tui::modal_keymap::ModalKeymap.
A few names exist in both worlds (create, help, command_logs,
link are global actions and modal contexts). TOML forbids defining
the same key twice, so a user picks one per file; the value type is
what the walkers below key off. Resolution / validation runs at
Config::load_for_repo time via Config::validate_tui_keys so a
malformed override (unknown action / context / verb, parse error,
per-context conflict, multi-stroke modal chord) is surfaced at load
rather than as a silent no-op in the TUI. The raw table is preserved so
gwm tui keys can show both the user’s source and the resolved set.
Fields§
§raw: TableImplementations§
Source§impl TuiKeysConfig
impl TuiKeysConfig
Sourcepub fn resolved_keymap(&self) -> Result<Keymap>
pub fn resolved_keymap(&self) -> Result<Keymap>
Resolve the global View::List keymap: the top-level array
entries of [tui.keys]. The [tui.keys.modal] sub-table (modal
contexts) is skipped here and handled by Self::resolved_modal_keymap.
Sourcepub fn resolved_modal_keymap(&self) -> Result<ModalKeymap>
pub fn resolved_modal_keymap(&self) -> Result<ModalKeymap>
Resolve the contextual modal keymap from the [tui.keys.modal]
sub-table, recursing into stages (link.choose_target, config.edit).
A missing [tui.keys.modal] table means no overrides — the built-in
defaults stand. The dedicated namespace (issue #219 review) keeps modal
contexts from colliding with same-named global actions during the
layered merge.
Trait Implementations§
Source§impl Clone for TuiKeysConfig
impl Clone for TuiKeysConfig
Source§fn clone(&self) -> TuiKeysConfig
fn clone(&self) -> TuiKeysConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TuiKeysConfig
impl Debug for TuiKeysConfig
Source§impl Default for TuiKeysConfig
impl Default for TuiKeysConfig
Source§fn default() -> TuiKeysConfig
fn default() -> TuiKeysConfig
Source§impl<'de> Deserialize<'de> for TuiKeysConfig
impl<'de> Deserialize<'de> for TuiKeysConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for TuiKeysConfig
impl RefUnwindSafe for TuiKeysConfig
impl Send for TuiKeysConfig
impl Sync for TuiKeysConfig
impl Unpin for TuiKeysConfig
impl UnsafeUnpin for TuiKeysConfig
impl UnwindSafe for TuiKeysConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more