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§
- Mode
Activator - Activation surface implemented by
lattice-host::Editorand consumed by extension crates that need to drive activation without holding a typed&mut Editor. - Virtual
RowRegistrar - 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 onlattice-host’s concreteVirtualRowProviderRegistry(AUX‑2).