smelt.statusline¶
Availability: Terminal UI only; raises in headless mode.
The statusline at the bottom of the screen. Register named sources with smelt.statusline.add(name, handler); each repaint calls every handler and lays out the returned items by priority. add returns a Reg that removes the source. UiHost-only.
smelt.statusline.add¶
Types: smelt.statusline.Item, smelt.Reg
── source registry ─────────────────────────────────────────────────
Add a named source of statusline items. handler runs on every repaint and
returns a list of items; errors are reported on stderr and skip the source.
Adding a name that already exists replaces that source in place, keeping its
position. Returns a Reg that removes this source, unless a later add with
the same name has replaced it.
smelt.statusline.invalidate¶
Repaint after plugin-owned state changes that are not represented by a built-in signal. Adding, replacing, and removing sources invalidates automatically.
smelt.statusline.remove¶
Remove every source named name.