mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
refactor(picker.finder): function signature of finders changed to fun(opts, ctx)
This commit is contained in:
parent
9db49b7e6c
commit
caf20764f1
8 changed files with 26 additions and 21 deletions
|
@ -5,7 +5,7 @@ local M = {}
|
|||
|
||||
---@param opts snacks.picker.buffers.Config
|
||||
---@type snacks.picker.finder
|
||||
function M.buffers(opts, filter)
|
||||
function M.buffers(opts, ctx)
|
||||
opts = vim.tbl_extend("force", {
|
||||
hidden = false,
|
||||
unloaded = true,
|
||||
|
@ -48,7 +48,7 @@ function M.buffers(opts, filter)
|
|||
return a.info.lastused > b.info.lastused
|
||||
end)
|
||||
end
|
||||
return filter:filter(items)
|
||||
return ctx.filter:filter(items)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue