mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-03 18:28:38 +00:00
feat(picker.config): added opts.config
which can be a function that can change the resolved options
This commit is contained in:
parent
69c013e1b2
commit
b37f368a81
2 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue