pub struct KeybindingAnnotator { /* private fields */ }Expand description
anno:keybinding. For CandidateData::Command candidates,
looks up the chord(s) bound to the command and pushes
Annotation::Keybinding so the renderer styles it with
the keybinding theme slot. Skips silently for
non-command candidates and for commands with no binding.
MARG.2 (2026-06-03): see
docs/dev/architecture/marginalia.md §6.
The reverse-lookup source is supplied at construction time
— typically the lattice-host’s keymap registry, which
rebuilds the reverse cache atomically alongside the merged
trie on every bind / unbind. The annotator does NOT
cache the result internally; each call hits the lookup
fresh so changes (e.g. user :map) take effect on the
next popup open without restart.
Implementations§
Source§impl KeybindingAnnotator
impl KeybindingAnnotator
pub fn new(reverse: Arc<dyn KeymapReverseLookup>) -> Self
Trait Implementations§
Source§impl CandidateAnnotator for KeybindingAnnotator
impl CandidateAnnotator for KeybindingAnnotator
fn annotate(&self, c: &mut RenderedCandidate)
Auto Trait Implementations§
impl !RefUnwindSafe for KeybindingAnnotator
impl !UnwindSafe for KeybindingAnnotator
impl Freeze for KeybindingAnnotator
impl Send for KeybindingAnnotator
impl Sync for KeybindingAnnotator
impl Unpin for KeybindingAnnotator
impl UnsafeUnpin for KeybindingAnnotator
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
Mutably borrows from an owned value. Read more