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-modeis a mode; a name not ending in-modeis a group. The macro emits aconst fnbyte-walk assertion at the declaration site; violations are compile errors. - Within a crate, two
groups!invocations with the same identifier are duplicatestructdefinitions ⇒ 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_levelgate/seed the per-processAiLoggerlog rings (mirroring the LSP log group above). Boot-time wiring into anAiLoggerlands 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-severitydrive the inline end-of-line diagnostic summary (lsp-architecture.md§15). The:customize diagnosticsumbrella. - 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; seemode-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 lspshows the union. - Magit
- Magit (git porcelain) options. MG.22b — the first options
lattice-magitowns; before this it registered none at all, so everymagit.*name a user tried failed withunknown 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 modelineumbrella 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.
- Option
Group Metadata - Metadata captured at macro expansion for one group. Submitted
to the
GROUP_DECLSdistributed slice; the registry’s startup loader walks the slice to validate uniqueness and build the&str → TypeIdlookup 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’sPluginTracergates 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_sizeadded byProjectSearchModeinlattice-multibuffer. - Snippet
- Snippet-engine options. SN.3b (2026-06-14):
snippet.activation+snippet.languagesare declared bySnippetModeinlattice-snippet; this group is the customize/listing umbrella (:customize snippet). Same shape asSearchabove — 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 withterminal.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 OptionGroupMetadataelement here. The registry validates cross-crate uniqueness at startup.
Traits§
- Option
Group - 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 fnbyte-walk: returns true iffsends in the literal suffix-mode. Used by thegroups!macro to assert the disambiguation invariant at compile time.