🐻 minimal ui2 fuzzy finder for Neovim codeberg.org/comfysage/artio.nvim
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(picker): helper fn is item structured

robin 85b85162 8bad5623

+5 -4
+5 -4
lua/artio/picker.lua
··· 169 169 self.idx = math.min(self.idx, #self.matches) 170 170 end 171 171 172 + local function item_is_structured(item) 173 + return type(item) == "table" and item.id and item.v and item.text 174 + end 175 + 172 176 function Picker:getitems(input) 173 177 self.items = self.get_items and self.get_items(input) or self.items 174 - if 175 - #self.items > 0 176 - and (type(self.items[1]) ~= "table" or not (self.items[1].v and self.items[1].id and self.items[1].text)) 177 - then 178 + if #self.items > 0 and not item_is_structured(self.items[1]) then 178 179 self.items = vim 179 180 .iter(ipairs(self.items)) 180 181 :map(function(i, v)