Skip to main content

Module document

Module document 

Source
Expand description

Document: a buffer plus the metadata needed for the rest of the editor.

Phase 0 only wires the editing-relevant fields (buffer, version, undo stack, selections, optional path). The full §5.1 metadata set – language, syntax, diagnostics, rendering_profile, encoding, line_ending – is added when each subsystem comes online. Major / minor modes (the mode-architecture.md mode system) live on modes, starting empty and populated by the lattice_mode::ModeRegistry when M.3 lands the per-buffer-kind major modes.

Structs§

Document
An editable document: a Buffer plus the bookkeeping every edit needs — a process-unique [DocumentId], an optional file path, version counters, the [SelectionSet], the UndoStack and dirty tracking.
DocumentBuilder
Builder for a Document with a path and/or initial content.