Contributing guidelines
Module(s)
mini.pick
Neovim version
0.12 (!at least latest Nightly build!)
Description
An error inside the show function silently closes the picker without any visible message. This can be a little bit disorienting, especially in cases where the show function is overridden, since it's not clear what went wrong.
This behavior seems unintended to me, so I'm opening this issue.
Expectation
I would expect the error to be visible in such cases, for example by re-throwing it or using vim.notify.
Reproduction
nvim --noplugin -u repro.lua repro.lua
<Space>f
<Esc>
:messages -- No error
-- repro.lua
vim.pack.add({
{ src = "https://github.com/nvim-mini/mini.nvim" },
})
require("mini.pick").setup()
MiniPick.registry.files = function(local_opts, opts)
opts = vim.tbl_deep_extend("keep", opts or {}, {
source = {
show = function()
error("No error?")
end,
},
})
return MiniPick.builtin.files(local_opts, opts)
end
vim.keymap.set("n", "<Space>f", "<Cmd>Pick files<CR>", { desc = "Pick files" })
Contributing guidelines
mainbranchModule(s)
mini.pick
Neovim version
0.12 (!at least latest Nightly build!)
Description
An error inside the
showfunction silently closes the picker without any visible message. This can be a little bit disorienting, especially in cases where theshowfunction is overridden, since it's not clear what went wrong.This behavior seems unintended to me, so I'm opening this issue.
Expectation
I would expect the error to be visible in such cases, for example by re-throwing it or using
vim.notify.Reproduction