Expand description
M.2.b.2 (2026-06-01): MultibufferMode — the major mode bound
to BufferKind::Multibuffer via H.2’s Mode::target_buffer_kind
declaration.
Thin major: contributes ReadOnly = true + NoFile = true
(M.3 will make ReadOnly conditional once edit propagation
lands). Excerpt-jump motion keymap (]e / [e / ]E / [E)
arrives in M.2.b.3. Provider-specific behaviour layers on as
minor modes (ProjectSearchMode etc., M.6+).
register_multibuffer_modes(®istry, &events, mb_registry)
is the single boot-wiring entry point the host calls. It
registers MultibufferMode AND wires the
Event::DocumentClosed subscriber that removes the closed
multibuffer’s entry from the MultibufferRegistry (cleanup
contract per multibuffer-views.md §3.7).
See docs/dev/architecture/multibuffer-views.md §3.7.
Structs§
- Multibuffer
Mode - Major mode for buffers of [
BufferKind::Multibuffer]. Generic; knows nothing about why excerpts exist. Provider-specific behaviour (project-search, lsp-references, etc.) is layered as minor modes registered by each provider’s ownregister_<provider>helper. - Multibuffer
Mode Guard - M.7 / M.8: deregisters all fold overlay providers when the mode is
deactivated. Holds one entry per registered provider
(
ExcerptFoldProvider+FileBoundaryFoldProvider).Dropfires when the buffer’s major mode is swapped out or the buffer closes. Also drops the generic<CR>jump-to-source action handler registration on deactivation.
Functions§
- register_
multibuffer_ ex_ commands - K.2.5 (2026-06-02): register
:multibuffer-expand [n]and:multibuffer-contract [n]ex-commands. - register_
multibuffer_ modes - Boot wiring entry point. Called once from
lattice-host’seditor_boot::bootafter theServiceRegistryis populated withMultibufferRegistryHandleand theEventBusexists.