gpui-kit GitHub

Components

HighlightedText builder

A run of text with some of it marked.

A builder is RenderOnce. Construct and mount it in one expression.

use gpui_kit::display::HighlightedText;

Construct

new(text: impl Into<SharedString>) -> Self

Options

Chain onto the value.

id(ident: impl Into<Ident>) -> Self
hits(hits: impl IntoIterator<Item = Range<usize>>) -> Self
current(index: usize) -> Self
monospace(monospace: bool) -> Self

Queries

Only answer; they change nothing.

published_hits() -> usize

Rendered by

Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.

Source: crates/gpui-kit/src/display/highlight.rs