smelt.picker¶
Tier: UiHost — Requires a terminal UI; calling these from headless mode raises.
Picker handle constructor. smelt.picker.new(opts) opens a picker overlay and returns a Picker userdata. The picker is non-blocking; the yield-until-pick wrapper lives in pure Lua as smelt.picker.choose(opts).
smelt.picker.fuzzy¶
Fuzzy-finder picker. Filters opts.items against the prompt input on every
keystroke, ranked by smelt.fuzzy.rank. Accepts string items or
{ label, description?, ansi_color?, search_terms? } records. Returns
{ index, item, action } on accept or nil on dismiss.
• opts.on_select(item) — fires on navigation
• opts.placement — defaults to "prompt_docked"
smelt.picker.new¶
Types: smelt.picker.Picker
Open a picker overlay and return a Picker userdata. The picker is non-blocking; the yield-until-pick wrapper lives in pure Lua as smelt.picker.choose(opts).