Skip to main content

Module events

Module events 

Source
Expand description

Picker-owned editor-bus events (§5.10).

PickerAccepted is the canonical signal a candidate was chosen. The MRU index subscribes to record on accept; plugins (Phase 7+) can subscribe for telemetry / heatmap views / behavioral learning. The publish path stays on the orchestration thread so the bus delivers the event to every subscriber synchronously – the MRU subscriber finishes its record-and-persist before the App applies the accept outcome.

Why typed events here instead of direct calls: the App’s do_picker_accept used to call picker_mru.record inline. Decoupling lets plugin sources (Phase 7) react without lattice-ui-tui growing per-plugin hooks, mirrors the §5.10 hooks / autocmds unification, and makes the “what fires on accept?” surface introspectable via :describe-events.

Structs§

PickerAccepted
Fired when the user accepts a candidate from a picker (either through Action::PickerAccept or the single- match LSP-picker short-circuit). The MRU index subscribes to record + persist; future plugin subscribers can read the same signal.
PickerDismissed
Fired when a picker dismisses without an accept (Esc, empty filter, source-side abort). Counterpart to PickerAccepted for subscribers that track open-without- accept sessions.
PickerOpened
Fired when a picker opens (:picker <source>). Carries the source id so subscribers can react to specific surfaces (e.g. a plugin that wants to inject extra candidates into :picker grep when it sees the open).