pub struct GpuiTheme {Show 25 fields
pub font_family: String,
pub font_size_pt: u32,
pub ligatures: bool,
pub background: u32,
pub foreground: u32,
pub status_background: u32,
pub status_foreground: u32,
pub cursor_background: u32,
pub cursor_foreground: u32,
pub popup_background: u32,
pub popup_border: u32,
pub picker_root: u32,
pub picker_title: u32,
pub picker_prompt: u32,
pub picker_count: u32,
pub popup_title: u32,
pub popup_hint: u32,
pub notification_warn: u32,
pub notification_error: u32,
pub notification_info: u32,
pub notification_success: u32,
pub picker_match_highlight: u32,
pub picker_marginalia_fg: u32,
pub indent_guide: u32,
pub indent_guide_active: u32,
}Expand description
GPUI peer’s typed theme cache.
Phase 5.7.B.12: real fields land for the surfaces the
binary currently paints (background, foreground, status
line, cursor inversion). Stored as Rgba so the render
hot path is a direct .bg(self.theme.background) etc. –
no per-frame conversion.
The defaults match the Catppuccin Mocha-ish palette the
binary’s render used inline pre-5.7.B.12. Future host-side
slices will grow host_theme to carry window bg / fg /
status / cursor fields; once that lands,
GpuiApp::rebuild_gpui_theme reads from there and
RendererSignal::ThemeChanged will visibly recolor the
window on every :set ui.*. For now the rebuild is a
shape-only no-op – the wiring is what this slice unblocks.
Why Rgba and not Hsla: gpui’s rgb(0x...) -> Rgba
builder is the natural literal form; .bg(Rgba) /
.text_color(Rgba) accept it directly via Into<Background>
/ Into<Hsla> blanket impls. Sticking with Rgba keeps the
theme literal-friendly + the binary’s render free of
conversion boilerplate.
Color storage discipline: the lib stores u32 packed
0xRRGGBB hex so it builds without the window feature (no
transitive gpui link). The binary converts to gpui::Rgba
at render time via gpui::rgb(theme.background).
Fields§
§font_family: StringFont family name for the editor window. Must be a monospace
typeface. Configurable via ui.font_family; defaults to
“Menlo” (built-in macOS monospace). Updated by
rebuild_gpui_theme on every RendererSignal::ThemeChanged.
font_size_pt: u32Font size in points. Configurable via ui.font_size.
ligatures: boolWhether OpenType ligatures are enabled. Configurable via
ui.ligatures (default true). When false,
FontFeatures::disable_ligatures() is applied to every
Font before shaping, suppressing calt (drives programming ligatures).
background: u32Main document background.
foreground: u32Main document foreground (text + non-cursor chars).
status_background: u32Status-line background.
status_foreground: u32Status-line foreground.
cursor_background: u32Cursor block background (Block shape) + bar / underline border color (Bar / Underline shapes).
cursor_foreground: u32Cursor block foreground – the character color when the block inverts (Normal/Visual mode cursor cell). Unused by Bar / Underline since the underlying char text stays the document foreground.
popup_background: u32Popup-overlay background (DisplayBuffer help surface). Slightly darker than the main bg for visual separation.
popup_border: u32Popup-overlay border / accent color.
picker_root: u32PP.2b: the root a rooted picker is scoped to, in its prompt.
Its own slot rather than popup_border (which it shared with the
(n/m) count) so the one piece of context the prompt carries is
not the dimmest thing on the line.
picker_title: u32PP.2c: the picker prompt’s source name, > marker and match
count. Own slots rather than the borrowed cursor_background /
popup_border they used — borrowing is what left the count and
the root indistinguishable, and is the same failure the
transient.* set was introduced to end.
picker_prompt: u32§picker_count: u32§popup_title: u32Popup header TITLE colour (bold accent) — ui.popup.title.
popup_hint: u32Popup header HINT colour (dim) — ui.popup.hint.
notification_warn: u32Notification-severity colours, sourced from the
diagnostic.{warning,error} theme elements.
The notification overlay referenced diff_change_line_bg /
diff_remove_line_bg here — fields that never existed on this
struct, so the window-feature build did not compile. Diff
line backgrounds were the wrong source anyway: these tint
notification text by severity, which is what
diagnostic.warning / diagnostic.error already mean, and
they recolour with :colorscheme like every other element.
notification_error: u32§notification_info: u32Info and success rows ↔ diagnostic.info / diff.add.sign,
the elements the TUI peer reads for the same levels.
notification_success: u32§picker_match_highlight: u32Issue #35 (2026-05-22): picker match-range highlight
color. Painted on the substring of each candidate that
matched the query. Catppuccin Mocha peach by default —
distinct from foreground so matches actually pop
(previously used cursor_background which equals
foreground in the default palette and made matches
invisible).
picker_marginalia_fg: u32Picker marginalia (annotation / kind glyph) color. Mid-grey by default so it doesn’t compete with the candidate text.
indent_guide: u32IG.4: indentation-guide rule colour, from the indent.guide
theme element. Dim by default — a guide bright enough to read
directly is one that competes with the code it measures.
indent_guide_active: u32IG.4: the guide for the block enclosing the cursor, from
indent.guide.active. Same hue undimmed; the contrast between
the two is what carries the signal.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpuiTheme
impl RefUnwindSafe for GpuiTheme
impl Send for GpuiTheme
impl Sync for GpuiTheme
impl Unpin for GpuiTheme
impl UnsafeUnpin for GpuiTheme
impl UnwindSafe for GpuiTheme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more