beamtea_help (beamtea v0.1.2)
View SourceA bubble: a help view that renders beamtea_keybind bindings, mirroring the help package in charmbracelet/bubbles.
Two modes: a compact single line (short help) and an expanded multi-column listing (full help). Disabled bindings are omitted automatically.
H = beamtea_help:new(),
beamtea_help:short(H, [Up, Down, Quit]), %% "↑/k up · ↓/j down · q quit"
beamtea_help:full(H, [[Up, Down], [Quit]]). %% grouped columns
Summary
Functions
Expanded help from groups (columns) of bindings, one line per binding.
Options: sep (separator, default " · "), key_color, desc_color.
Compact one-line help from a flat list of bindings.
Render short help when ShowAll is false, full help otherwise. When ShowAll, Bindings must be a list of groups.
Types
Functions
-spec full(model(), [[beamtea_keybind:binding()]]) -> iodata().
Expanded help from groups (columns) of bindings, one line per binding.
-spec new() -> model().
Equivalent to new(#{}).
Options: sep (separator, default " · "), key_color, desc_color.
-spec short(model(), [beamtea_keybind:binding()]) -> iodata().
Compact one-line help from a flat list of bindings.
Render short help when ShowAll is false, full help otherwise. When ShowAll, Bindings must be a list of groups.