Skip to content

Commit d4a006c

Browse files
committed
fix(base_picker): snacks, set item.text for matching
1 parent 80d2467 commit d4a006c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lua/opencode/ui/base_picker.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,13 @@ local function snacks_picker_ui(opts)
286286
finder = function()
287287
return opts.items
288288
end,
289+
transform = function(item, ctx)
290+
-- Snacks requires item.text to be set to do matching
291+
if not item.text then
292+
local picker_item = opts.format_fn(item)
293+
item.text = picker_item:to_string()
294+
end
295+
end,
289296
format = function(item)
290297
return opts.format_fn(item):to_formatted_text()
291298
end,

0 commit comments

Comments
 (0)