refactor(picker.finder): function signature of finders changed to fun(opts, ctx)

This commit is contained in:
Folke Lemaitre 2025-01-22 21:12:27 +01:00
parent 9db49b7e6c
commit caf20764f1
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
8 changed files with 26 additions and 21 deletions

View file

@ -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