feat: error message when passing associative table to select

This commit is contained in:
Steven Arcangeli 2021-12-03 22:51:34 -08:00
parent 37349af9e1
commit 18a3548205
1 changed files with 7 additions and 1 deletions

View File

@ -16,7 +16,13 @@ end
return function(items, opts, on_choice)
vim.validate({
items = { items, "table", false },
items = {
items,
function(a)
return type(a) == "table" and vim.tbl_islist(a)
end,
"list-like table",
},
on_choice = { on_choice, "function", false },
})
opts = opts or {}