tangled
alpha
login
or
join now
robinwobin.dev
/
artio.nvim
3
fork
atom
minimal extui fuzzy finder for neovim
3
fork
atom
overview
issues
pulls
pipelines
feat: allow `start_opts` param for ui select
robinwobin.dev
4 months ago
4f7237b8
aaba09ce
+4
-3
1 changed file
expand all
collapse all
unified
split
lua
artio
init.lua
+4
-3
lua/artio/init.lua
···
43
43
---@param items T[] Arbitrary items
44
44
---@param opts vim.ui.select.Opts Additional options
45
45
---@param on_choice fun(item: T|nil, idx: integer|nil)
46
46
-
artio.select = function(items, opts, on_choice)
47
47
-
return artio.generic(items, {
46
46
+
---@param start_opts? artio.Picker.proto
47
47
+
artio.select = function(items, opts, on_choice, start_opts)
48
48
+
return artio.generic(items, vim.tbl_deep_extend("force", {
48
49
prompt = opts.prompt,
49
50
on_close = function(_, idx)
50
51
return on_choice(items[idx], idx)
···
52
53
format_item = opts.format_item and function(item)
53
54
return opts.format_item(item)
54
55
end or nil,
55
55
-
})
56
56
+
}, start_opts or {}))
56
57
end
57
58
58
59
---@generic T