Expand description
CM.4 (2026-07-22): the *problems* multibuffer view — the
grouped, editable “problems” surface for the error list.
Design: docs/dev/architecture/compilation-mode.md §4. Slice plan:
docs/dev/operations/slice-plans/compilation-mode.md (CM.4).
:copen groups the current error entries as anchored source
excerpts (a few context lines around each error location), one
excerpt per entry, grouped by file. The view is a regular
BufferKind::Multibuffer — editable in place, edits propagate to
the source via the standard M.3 pipeline — with ProblemsMinorMode
as its identity marker. :cclose closes it.
Like providers::narrow (and unlike feature-gated
providers::search), problems is a first-class built-in: no
cargo feature gate. It reuses the exact source-loading shape the
search provider uses — read each referenced file into a fresh
RopeDocumentHandle (spawn_document) and add it to the view’s
source map — the only difference being that the entry list is
static (no async scan), so loading runs synchronously here rather
than in a forwarder task.
Structs§
- Problems
Minor Mode problems-minor-mode— the provider-minor activated on a*problems*view. Pure identity marker (likeNarrowMode): a multibuffer with this minor active IS a problems view, which the host’s:ccloseguard reads. Editable — noReadOnlyoverride, so edits propagate to the source.on_activateis a no-op so the marker is cheap; theq→close chord can land in a follow-up.- Problems
Minor Mode Guard - RAII guard for
ProblemsMinorMode. Unit — no subscriptions / action handlers yet (mirrorsNarrowModeGuard).
Functions§
- create_
problems_ view - Open a
*problems*multibuffer view groupingentriesas anchored source excerpts. Returns the new view’sBufferId, orNonewhenentriesis empty (nothing to show) or every referenced file is unreadable (no excerpt could be built). - refresh_
problems_ view - RV.3 (2026-08-10): rebuild an existing
*problems*view from the current error list, in place. Returns the new entry count, orNonewhen the view is unknown to the multibuffer registry or the fresh entry set yields nothing to show (in which case the view is left exactly as it was — a refresh must never blank the buffer the user is reading). - register_
problems_ ex_ commands - Boot helper — register the
:copen+:ccloseex-commands. - register_
problems_ mode - Boot helper — register the problems provider-minor mode. Called
from [
crate::install] alongside the other multibuffer modes.