Skip to main content

Module group

Module group 

Source
Expand description

Option groups: the user-facing organization unit for :customize <name> (mode-architecture.md §6.7.1.1).

Each group is a unique Rust type implementing OptionGroup. Pre-registered built-in groups ship with the editor: Editor, Display, Editing, Lsp, Completion, Picker, Filetree, Oil, Help, Appearance. Plugins can join existing groups (by referencing the type) or declare new ones (in their own <plugin-id>.<group> namespace).

Compile-time invariants enforced by the crate::groups! macro:

  • Group display names cannot end in -mode. The modes-vs-groups disambiguation rule (mode-architecture.md §6.7.1) depends on this – a name ending in -mode is a mode; a name not ending in -mode is a group. The macro emits a const fn byte-walk assertion at the declaration site; violations are compile errors.
  • Within a crate, two groups! invocations with the same identifier are duplicate struct definitions ⇒ compile error.

Cross-crate display-name uniqueness is enforced at startup via linkme aggregation in GROUP_DECLS.

Structs§

Ai
AI-agent (ACP client) options. AI-1b: ai.log / ai.log_level gate/seed the per-process AiLogger log rings (mirroring the LSP log group above). Boot-time wiring into an AiLogger lands in a later task; this group only makes the options resolvable and :set-able.
Appearance
Appearance / theming options (colors, sprite icons, font rendering).
Completion
Completion-related options across providers (LSP completion, snippets, buffer-words, paths).
Diagnostics
Diagnostics presentation options. L4 (2026-06-21): ui.diagnostics.inline + ui.diagnostics.inline-min-severity drive the inline end-of-line diagnostic summary (lsp-architecture.md §15). The :customize diagnostics umbrella.
Display
Visual-presentation options across modes: line numbers, wrap continuation marker, gutter contents, current-line highlight, whitespace visualization.
Editing
Editing-related options: search behavior, indent, auto-pair, and similar text-manipulation defaults.
Editor
Built-in editor options without a mode-specific prefix (tabstop, number, wrap, …). Reserved namespace – only built-in modes can declare options into this group (enforced by the macro API surface, not by group access control; see mode-architecture.md §6.8 for the reservation mechanism).
Filetree
File-tree mode options.
Help
Help / documentation buffer options.
Lsp
LSP umbrella group: collects every option owned by an LSP mode (lsp-mode, lsp-completion-mode, lsp-diagnostics-mode, …). :customize lsp shows the union.
Magit
Magit (git porcelain) options. MG.22b — the first options lattice-magit owns; before this it registered none at all, so every magit.* name a user tried failed with unknown option.
Messages
*messages* audit-log buffer + tracing-bridge options.
Modeline
Modeline (bottom per-pane status row) layout options. ML.5 (2026-06-21): ui.modeline.{left,center,right} zone assignment + ui.modeline.separator. The :customize modeline umbrella for the configurable element-system modeline (docs/dev/architecture/modeline.md §11).
Mouse
Mouse-reporting options. MO.1 (2026-08-21): ui.mouse, the single switch that decides whether the editor asks the terminal for mouse events at all.
Notifications
Notification options (§5.9.9) — corner, how many show at once, how long they stay.
Oil
Oil mode (editable directory buffer) options.
OptionGroupMetadata
Metadata captured at macro expansion for one group. Submitted to the GROUP_DECLS distributed slice; the registry’s startup loader walks the slice to validate uniqueness and build the &str → TypeId lookup table.
Pane
Per-pane behaviour options. PBH.4: pane.buffer-history-size, the bound on each pane’s buffer trail (<C-6> / <C-7>).
Picker
Picker (file finder, command palette, symbol search) options.
Plugin
Plugin observability options: plugin.trace-level (the global default boundary-trace verbosity the host’s PluginTracer gates on). PO.4.3.
Project
Project-resolution options. PR.2 (2026-08-21): project.root-markers, the marker set every buffer’s project root is discovered by (docs/dev/architecture/project-resolution.md §4).
Search
Project-search options (:search, project-search multibuffer, future LSP-references etc. as those settle). K.4.6 follow-up (2026-06-02): search.context_size added by ProjectSearchMode in lattice-multibuffer.
Snippet
Snippet-engine options. SN.3b (2026-06-14): snippet.activation + snippet.languages are declared by SnippetMode in lattice-snippet; this group is the customize/listing umbrella (:customize snippet). Same shape as Search above — group here, options in the owning mode’s crate.
Tabline
Tabline (tab strip at the top of the screen). Issue #29 (2026-05-22).
Terminal
Terminal-mode (PTY-backed shell buffer) options. Added with T2.b.0 (terminal.esc-exits); T2.b/T4 grow the group with terminal.shell, terminal.scrollback-lines, etc.
Window
GPUI window options: OS chrome (ui.window.decorations) and maximize-on-launch (ui.window.start-maximized). GPUI peer only.

Statics§

GROUP_DECLS
Distributed slice of every group declared anywhere in the workspace. Each groups! macro invocation submits a &'static OptionGroupMetadata element here. The registry validates cross-crate uniqueness at startup.

Traits§

OptionGroup
Compile-time declaration of one option group. Each group is a unit struct (typically generated by the crate::groups! macro) implementing this trait.

Functions§

ends_with_mode_suffix
const fn byte-walk: returns true iff s ends in the literal suffix -mode. Used by the groups! macro to assert the disambiguation invariant at compile time.