pub struct LeaderKeyProvider { /* private fields */ }Expand description
Provider for the leader key notation.
Personality modules call set during init() to declare
their leader key (e.g., "<Space>" for vim). Bootstrap calls get
after all modules have loaded and expands <leader> in keybinding strings.
The stored value is &'static str because all call sites are personality
module init() methods passing compile-time string literals. This matches
the KeybindingRegistration.keys lifetime requirement.
If multiple personality modules are loaded, the last writer wins and a warning should be logged by the caller.
Implementations§
Source§impl LeaderKeyProvider
impl LeaderKeyProvider
Sourcepub fn set(&self, key: &'static str) -> Option<&'static str>
pub fn set(&self, key: &'static str) -> Option<&'static str>
Set the leader key notation. Called by personality modules during init().
The key parameter is a key notation string (e.g., "<Space>") that
will replace <leader> tokens in keybinding key strings.
Returns the previous notation if one was already set.