Skip to main content

register_multibuffer_modes

Function register_multibuffer_modes 

Source
pub fn register_multibuffer_modes(
    registry: &mut ModeRegistry,
    events: &Arc<EventBus>,
    multibuffer_registry: MultibufferRegistryHandle,
)
Expand description

Boot wiring entry point. Called once from lattice-host’s editor_boot::boot after the ServiceRegistry is populated with MultibufferRegistryHandle and the EventBus exists.

  1. Registers MultibufferMode against registry (so ModeRegistry::find_major_for_kind(BufferKind::Multibuffer) returns its id post-H.2).
  2. Subscribes a DocumentClosed cleanup task that removes a closed multibuffer’s entry from multibuffer_registry. Uses the existing SubscriptionTarget::Channel shape + tokio::spawn for the drain loop (same pattern as the LSP / mode-lifecycle drains).