smelt.list¶
Tier: UiHost - Requires a terminal UI; calling these from headless mode raises.
Classification: Supported - Primary alpha facade for user config and plugins.
Picker-style virtual list widget. smelt.list.new(opts) returns a handle that owns the buffer, current selection, and keymaps so a plugin can render a scrollable selectable list inside any window or dialog leaf. UiHost-only.
smelt.list.new¶
Types: smelt.list.Opts, smelt.list.List
Build a structured list bound to the dialog-list opts.leaf and its
backing opts.buf. opts.items is the data source; opts.render(item)
returns { text, spans?, marks }; opts.filter(item) is optional and re-runs
whenever :set_filter / :refresh fires. opts.empty_text shows
when no row passes the filter. opts.anchor = "bottom" pads short result
sets above the rows so filtered pickers stay pinned to the bottom of their
viewport. The returned handle can replace items while preserving selection,
change its filter or renderer, inspect visible/selected rows, and move its
0-based cursor.