Skip to main content

Module activator

Module activator 

Source
Expand description

ModeActivator: synchronous activation surface for extension crates that create buffers and need their major / minor modes activated on the host side.

M.2.b.2 (2026-06-01) introduces this trait so lattice-multibuffer (and every future in-tree provider that ships within it) can atomically insert + activate-major a buffer without depending on lattice-host directly. The activation cascade requires &mut Editor (it mutates per-buffer mode state, options cache, completion sources, LSP wiring) — but extension crates can’t import lattice-host’s Editor type. This trait, living in lattice-mode, is the seam both crates depend on.

See docs/dev/architecture/multibuffer-views.md §3.7 + the H-series deferral note in docs/dev/architecture/kind-agnostic-buffers.md §10 for the design.

Traits§

ModeActivator
Activation surface implemented by lattice-host::Editor and consumed by extension crates that need to drive activation without holding a typed &mut Editor.
VirtualRowRegistrar
Service-accessible interface for registering virtual row providers on a buffer. The host registers an Arc<dyn VirtualRowRegistrar> during boot so subsystems (e.g. lattice-ai) can register headerlines without depending on lattice-host’s concrete VirtualRowProviderRegistry (AUX‑2).