Skip to main content

Module theme_options

Module theme_options 

Source
Expand description

Renderer-neutral UI / theme options.

Phase 5.5.E.6: relocated from lattice-ui-tui::tui_options so the host can read these values directly when synchronising [crate::ui::theme::Theme] from config. Every option here drives the renderer-neutral [crate::ui::theme::Theme]; the adapter into a renderer’s native style type lives in that renderer’s crate.

Self-registration via linkme – the registry’s init_from_linkme() walks the slice at App boot regardless of which crate emitted the entries, so linking the host crate into any renderer picks these up automatically.

Storage shape: every option stores its current primitive value (bool for the toggle, String for the color name and the separator glyph) in the config. The renderer-specific derived style table (TUI’s [ratatui::style::Style], GPUI’s Hsla, …) is kept as a cached projection on the renderer and refreshed after every :set cascade via the RendererSignal::ThemeChanged signal.

Structs§

PopupWrap
Wrap long lines in floating help / hover popups (K, :describe-*, :help) at the popup’s locked width instead of clipping at the right edge. When disabled, lines longer than the popup width are truncated visually (the underlying help-buffer content is unchanged).
UiDiagnosticErrorGlyph
Glyph drawn in the gutter severity column for an Error-severity diagnostic (default ■). One character; the colour resolves through the diagnostic.error theme element, not this option.
UiDiagnosticHintGlyph
Glyph drawn in the gutter severity column for a Hint-severity diagnostic (default ·).
UiDiagnosticInfoGlyph
Glyph drawn in the gutter severity column for an Information-severity diagnostic (default ●).
UiDiagnosticWarningGlyph
Glyph drawn in the gutter severity column for a Warning-severity diagnostic (default ▲).
UiDimInactive
Apply a DIM overlay on inactive panes’ syntax-highlighted text so the active pane stands out without losing color.
UiFontFamily
Font family used by the GPUI (native window) renderer. Accepts a single font family name. The font MUST be a monospace typeface — proportional fonts produce incorrect cursor placement because the advance-width measurement assumes all glyphs share the same cell width.
UiFontSize
Font size in points for the GPUI (native window) renderer. Must be a positive integer. The TUI renderer ignores this option — font size is controlled by the terminal emulator.
UiInactivePaneOpacity
Opacity of the buffer content in inactive panes, as a percentage in [0, 100]. Renderers that support alpha blending (GPUI) apply this when UiDimInactive is true; the TUI peer ignores it (terminal cells don’t have a true alpha channel — TUI uses its Modifier::DIM instead).
UiKeyboardEnhancement
Whether to request the terminal’s keyboard-enhancement protocol (the “kitty protocol”) when the terminal reports support for it.
UiLigatures
Whether to enable OpenType ligatures in the GPUI renderer.
UiNerdFonts
Whether to render file-type icons as Nerd Fonts v3 glyphs.
UiSeparator
Character drawn in the column separating side-by-side panes (default │).
UiSeparatorColor
Foreground color of the pane separator. Accepts named ANSI colors (red, blue, darkgray, …) and default for the terminal default.
UiSeparatorHorizontal
Character drawn in the row separating stacked (horizontal- split) panes (default ─, U+2500). Currently used only by layouts that disable per-pane status lines; the per-pane status line otherwise delimits horizontal splits.
UiStatuslineActiveFg
Foreground color of the active pane’s status line.
UiStatuslineInactiveFg
Foreground color of inactive panes’ status lines.