Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions lua/dotmd/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,26 @@ function M.pick(opts)
local prompt_prefix = opts.grep and "Grep for" or "Pick a"
local prompt = prompt_prefix .. prompt_name_type .. ": "

local allowed_pickers = {
fzf = true,
telescope = true,
snacks = true,
}

if opts.picker then
local picker_ok = picker[opts.picker](opts, dirs, prompt)
if not allowed_pickers[opts.picker] then
vim.notify(
"Aborted... Picker "
.. opts.picker
.. " is not supported, fallback to vim.ui.select",
vim.log.levels.WARN
)
else
local picker_ok = picker[opts.picker](opts, dirs, prompt)

if picker_ok then
return
if picker_ok then
return
end
end
end

Expand Down