Skip to content

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

fun(name: string, handler: fun(): smelt.statusline.Item[]?): smelt.Reg

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

fun()

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

fun(name: string)

Remove every source named name.