minimal extui fuzzy finder for neovim

fix: `on_quit` hook select api

+7
+3
lua/artio/init.lua
··· 134 134 on_close = function(_, idx) 135 135 return on_choice(items[idx], idx) 136 136 end, 137 + on_quit = function() 138 + return on_choice(nil, nil) 139 + end, 137 140 }, 138 141 opts or {}, -- opts.prompt, opts.format_item 139 142 start_opts or {}
+4
lua/artio/picker.lua
··· 16 16 ---@field preview_item? fun(item: any): integer, fun(win: integer) 17 17 ---@field get_icon? fun(item: artio.Picker.item): string, string 18 18 ---@field hl_item? fun(item: artio.Picker.item): artio.Picker.hl[] 19 + ---@field on_quit? fun() 19 20 ---@field prompt? string 20 21 ---@field defaulttext? string 21 22 ---@field prompttext? string ··· 88 89 self:close() 89 90 90 91 if result == action_enum.cancel or result ~= action_enum.accept then 92 + if self.on_quit then 93 + self.on_quit() 94 + end 91 95 return 92 96 end 93 97