Expand description
messages-mode – major mode for the editor’s *messages*
audit-log buffer (design.md §5.10.6).
Single buffer in the editor (*messages*). The mode’s job
is small but architecturally important:
- Identity: the buffer’s major mode IS
messages-mode, nottext-mode + read-only-mode. Symmetric withlsp-log-modefor*lsp*. The renderer can branch onmessages-modeif it ever needs to (today it doesn’t). - Read-only contribution: the mode contributes
ReadOnly = trueso the modal dispatcher gates user keystrokes; subsystem writes bypass viaapply_edit_batch_blocking. - Future home for the tracing-subscriber lifecycle
(deferred to v1.1). msg-mode.1 installs the global
subscriber once at App boot; making the subscriber’s
enable/disable mode-driven is a refinement that lives in
the mode’s
Guardonce it lands.
Marker mode for v1: type Guard = ();, trivial
on_activate. The work the spec attributes to
“registers a tracing::Subscriber at activate time” is
split across the App boot path
(lattice_runtime::install_messages_subscriber) for v1
simplicity. The mode-driven lifecycle binding lands when
reload-based subscriber control is wired in v1.1.
Structs§
- Messages
Mode - Major mode for the
*messages*buffer.
Functions§
- buffer_
spans line_spansfor a whole buffer, one entry per line.- line_
spans - Syntax-highlight one
*messages*line.