Expand description
Declarative contributions on crate::Mode.
Keymap and KeymapBinding moved to lattice-keymap::contribution
in K.3 (2026-06-07) — re-exported here for backward compatibility.
Stubs still pending real impls:
DecorationProvider– M.4 / decoration registry.
Structs§
- Builtin
Sign Ids - The interned ids of the built-in signs (SG.4a).
- Compilation
Severity Data - Render-time carrier for
compilation-mode’s severity gutter marks. The off-thread compilation drain builds a per-buffer severity index and ships it to the host (AppEffect::CompilationGutterSet), which stores it inrender_state; the renderer reads that slot for the pane’s buffer and registers this into theDecorationCtx’sServiceRegistry.CompilationMode::gutter_decorationsthen pulls it and maps each(line, level)to aGutterDecoration::Signnaming the built-in diagnostic sign for that level (BuiltinSignIds::for_severity) — the same mark an LSP diagnostic paints (CM.3c; before SG.4b this was a dedicatedSeverityvariant). - Decoration
Ctx - Read-only context passed to
crate::Mode::gutter_decorations. - Decoration
Provider - Stub. Reserved for the WIT plugin-facing contribution surface
(M.10). Not used by the
Modetrait today — seeMode::gutter_decorationsfor the live decoration path. - Diagnostic
Glyphs - The four
ui.diagnostic-*-glyphvalues, read once by the caller solattice-modeneeds no typed-options dependency. - Keymap
- A mode’s full keymap contribution.
- Keymap
Binding - One mode-contributed keymap binding.
- Sign
Definition - A sign definition: what it looks like, how it is styled, how it competes for its cell (SG.1).
- SignId
- A definition’s interned handle (SG.1).
- Sign
Registry - The registered sign definitions (SG.1).
- Subscription
- RAII subscription handle. Unsubscribes from the event bus on drop.
Enums§
- Gutter
Decoration - A single gutter decoration contributed by a
crate::Mode. Each variant maps to one physical gutter column. - Gutter
Diff Kind - Renderer-agnostic diff-sign kind for the gutter diff column.
Mirrors
DiffSignKindwithout importinglattice-host. - Gutter
Severity Level - Renderer-agnostic diagnostic severity level for the gutter
severity column. Ordered ascending by severity so
max()selects the most severe:Hint < Info < Warning < Error.
Constants§
- BUILTIN_
SIGN_ COLUMNS - The built-in gutter columns, left to right (SG.4a).
- DIAGNOSTIC_
ERROR_ PRIORITY - The highest built-in. A sign must EXCEED this to take the cell from an error.
- DIAGNOSTIC_
HINT_ PRIORITY - The lowest diagnostic, level with vim’s default sign priority.
- DIAGNOSTIC_
INFO_ PRIORITY - Priority of the built-in
diagnostic.infosign: above a hint, below a warning. - DIAGNOSTIC_
WARNING_ PRIORITY - Priority of the built-in
diagnostic.warningsign: above info, below an error. - DIFF_
SIGN_ PRIORITY - Diff marks never contend with each other — a line belongs to at most one hunk — so they share one priority, and it is the vim default because nothing about a hunk mark argues for out-ranking a plugin’s sign in a column plugins do not normally use.
- SIGN_
COLUMN_ DIFF - The git-diff column, between the mark column and the line numbers.
Separate from
SIGN_COLUMN_MARKso a diagnostic cannot hide a hunk mark (SG.4a). - SIGN_
COLUMN_ MARK - The leftmost gutter column: diagnostics, compilation severity, and
any sign that does not name a column of its own. Vim’s
signcolumn(SG.4a).
Functions§
- register_
builtin_ signs - Register the built-in signs into
registryand return their ids (SG.4a). - winning_
sign - Pick the winner when several signs land on one line (SG.1).
Type Aliases§
- Sign
Registry Handle - Register and look up with this exact alias (the
ServiceRegistryTypeId rule).