Expand description
BC.8a (2026-06-24): the crate-owned install(boot) entry point.
LSP is the last + largest boot-composition migration; it is sub-sliced
(BC.8a–e). BC.8a is the behaviour-preserving foundation: the LSP modes
and the four server-*/refresh off-keystroke wakes register through the
generic [SubsystemBoot] surface, collapsing those host sites into the
Phase-B install line. The inbound buses (apply-edit / show-document /
configuration / show-message-request) reshape onto boot.inbound::<T> in
the later sub-slices (BC.8b–e).
§What BC.8a collapses here
- Modes —
register_lsp_log_modes(the ~17 LSP modes: log/trace/ diagnostics/hover/signature/format/rename/symbols/code-action/nav/ progress/highlight/selection-range/folding/inlay/semantic-tokens) +register_lsp_completion_mode, which needs theLspSupervisorHandle. That handle is a host-created value (the supervisor + its four server-initiated buses live ineditor_boot::build_lsp_subsystem, which producesEditorfields — the diffDiffSubsystem-bind residue class), so the host registers it as a Phase-A service and the install reads it back generically viaboot.service::<LspSupervisorHandle>()— the trait names no host type, and mode-ownership is preserved (the mode owns its registration; the host owns the supervisor’s lifecycle). - Off-keystroke wakes — the four
workspace/*/refreshnotifications (LspInlayHintRefresh/LspSemanticTokensRefresh/LspDiagnosticRefresh/LspCodeLensRefresh) becomeboot.wake_on_event::<E>(). Behaviour is byte-identical to the host’s hand-rolled L1cwake_onforwarders (subscribe-typed + spawn a notify task), now baked into the primitive so the wake can’t be forgotten (paramount #4). The per-type drain channels (pending_*_refresh_rx→drain_*_refreshEditor methods) keep doing the cache-eviction work host-side — they are&mut Editorresidue, untouched.
§What stays host-side (residue, NOT mode-ownership violations)
build_lsp_subsystem— producesEditor-field values (the supervisor handle, theDiagnosticsLayerthe renderer reads per-frame, the fourpending_*_rxinbound receivers).install(boot)returns nothing and can’t seat Editor fields — the diffDiffSubsystem-bind precedent.- The host-created services (
LspSupervisorHandle,LspLogger,DiagnosticsQueryHandle) are registered host-side because the host owns the values (diff’sDiffSubsystemHandleprecedent).installonly reads the supervisor handle for completion-mode registration. lsp_diagnostics.set_wakearms theDiagnosticsLayer’s render wake — an Editor-field. The inbound drains + the modeline (ModelineElementUpdate, a generic event) wake stay host-side.
Functions§
- install
- Wire the LSP subsystem’s modes + off-keystroke refresh wakes into the editor
at boot (BC.8a). One Phase-B line in
editor_boot.rs.