feat(picker.config): added opts.config which can be a function that can change the resolved options

This commit is contained in:
Folke Lemaitre 2025-01-30 10:40:10 +01:00
parent 69c013e1b2
commit b37f368a81
2 changed files with 6 additions and 0 deletions

View file

@ -82,6 +82,11 @@ function M.get(opts)
elseif opts.cwd then
opts.cwd = vim.fs.normalize(vim.fn.fnamemodify(opts.cwd, ":p"))
end
for _, t in ipairs(todo) do
if t.config then
opts = t.config(opts) or opts
end
end
M.multi(opts)
return opts
end