Expand description
Renderer-agnostic statusline data model.
Build a Bar from host state, then hand it to a renderer adapter
(e.g. hjkl-statusline-tui for ratatui, hjkl-statusline-gui for floem).
Naming follows the vim convention (:help statusline, lualine,
vim-airline, lightline).
Structs§
- Bar
- A fully-laid-out statusline: left segments + spacer + right segments.
- Color
- Resolved RGBA color (all channels 0–255).
- Modifiers
- Per-character text modifiers.
- Status
Theme - Theme colours the status row needs. Caller populates from its own theme.
- Style
- Alias for
hjkl_theme::StyleSpec: foreground, background, modifiers. Foreground, background, and modifier flags for a syntax or UI element.
Enums§
- Mode
Kind - High-level mode classification for color selection.
- Segment
- A single horizontal segment in the statusline.
Traits§
Functions§
- cursor_
segment - Build the cursor position segment (
row:col). - dirty_
segment - Build a dirty-marker segment (
●when dirty, empty otherwise). - filename_
segment - Build the filename segment including suffix tags (e.g.
[RO],[New File]). - loading_
segment - Build a loading/spinner segment (
⠋ label). - mode_
segment - Build the mode badge segment (e.g.
NORMAL). - pending_
segment - Build a pending-count/operator segment (
{count}{op}). ReturnsNonewhen empty. - percent_
segment - Build the percentage segment (
N%). - recording_
segment - Build a recording-register segment (
REC @r). - search_
count_ segment - Build a search-count segment (
[idx/total]). - truncate_
filename - Truncate
filenameso it fits inavaildisplay columns, prepending…when truncation occurs. Returns the (possibly truncated) string.