Skip to main content

Module annotators

Module annotators 

Source
Expand description

Built-in annotators (DESIGN.md §5.11.3).

Annotators run AFTER ranking. Each appends typed Annotation values to RenderedCandidate.annotations; the renderer paints each one with the style its category resolves to. See docs/dev/architecture/marginalia.md.

Structs§

DocSnippetAnnotator
anno:doc-snippet. Appends the first line of the candidate’s documentation if available. Pushes Annotation::DocSnippet so the renderer styles it with the doc-annotation theme slot.
KeybindingAnnotator
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.
KindLabelAnnotator
anno:kind-label. Tags every candidate with (command), (file), (motion), etc. – the kind label. Pushes Annotation::Kind so the renderer styles it with the kind-annotation theme slot.

Enums§

KeybindingSource
Structured provenance for a keybinding annotation: where the chord comes from. Used by both the filtering logic (show only if the source mode is active) and the display column (show the mode name alongside the chord).

Traits§

KeymapReverseLookup
Reverse-lookup contract the keybinding annotator depends on: given a command’s canonical name, return the chord sequence(s) bound to it. Empty vec means “no binding.”