Skip to main content

Module install

Module install 

Source
Expand description

Wire the dashboard subsystem into the editor at boot (DB.2, DB.5, DB.6). Called from the host’s Phase-B install list (editor_boot.rs) — the only host touch-point the mode-ownership acid test allows.

install registers five things, all owned by this crate:

  • dashboard-mode (the major mode) into the mode registry;
  • the :dashboard ex-command, whose apply returns the lifecycle Effect::OpenDashboard the host applies (buffer creation mutates &mut Editor, so the applier is the sanctioned host boundary — same shape as :messages/:diff);
  • the built-in DashboardRegistry as a service, so the host’s do_open_dashboard can compose the page;
  • (DB.5) the mode-owned startup trigger: a one-shot subscription to lattice_mode::Startup that emits the same Effect::OpenDashboard when the editor booted with no file argument and dashboard.enabled;
  • (DB.6) the mode-owned recompose trigger: a long-lived subscription to Event::OptionChanged that re-emits Effect::OpenDashboard — this time gated on the dashboard already being open — whenever dashboard.sections, dashboard.source, or ui.nerd_fonts changes.

Functions§

install
Install the dashboard subsystem: mode + :dashboard command + the built-in section registry service.