mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(picker.select): allow configuring vim.ui.select
with the select
source. Closes #776
This commit is contained in:
parent
1f648b1094
commit
d70af2d253
5 changed files with 14 additions and 6 deletions
|
@ -29,15 +29,12 @@ function M.select(items, opts, on_choice)
|
|||
return Snacks.picker.pick({
|
||||
source = "select",
|
||||
items = finder_items,
|
||||
main = { current = true },
|
||||
format = Snacks.picker.format.ui_select(opts.kind, #items),
|
||||
title = title,
|
||||
layout = {
|
||||
preset = "select",
|
||||
preview = false,
|
||||
layout = {
|
||||
height = math.floor(math.min(vim.o.lines * 0.8 - 10, #items + 2) + 0.5) + 10,
|
||||
title = " " .. title .. " ",
|
||||
title_pos = "center",
|
||||
},
|
||||
},
|
||||
actions = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue