tangled
alpha
login
or
join now
robinwobin.dev
/
artio.nvim
3
fork
atom
🐻 minimal ui2 fuzzy finder for Neovim
codeberg.org/comfysage/artio.nvim
3
fork
atom
overview
issues
pulls
pipelines
feat(builtins): add `setqflist` action to files picker
robinwobin.dev
4 months ago
b9f3b2bc
1e464edd
+19
1 changed file
expand all
collapse all
unified
split
lua
artio
builtins.lua
+19
lua/artio/builtins.lua
···
68
68
preview_item = function(item)
69
69
return vim.fn.bufadd(item)
70
70
end,
71
71
+
actions = {
72
72
+
setqflist = function(self, co)
73
73
+
vim.fn.setqflist(vim
74
74
+
.iter(ipairs(self.matches))
75
75
+
:map(function(_, match)
76
76
+
local item = self.items[match[1]]
77
77
+
return { filename = item.v }
78
78
+
end)
79
79
+
:totable())
80
80
+
vim.schedule(function()
81
81
+
vim.cmd.copen()
82
82
+
end)
83
83
+
coroutine.resume(co, 1)
84
84
+
end,
85
85
+
},
86
86
+
mappings = {
87
87
+
["<c-q>"] = "setqflist",
88
88
+
},
71
89
}, props)
72
90
)
73
91
end
74
92
75
93
builtins.grep = function(props)
76
94
props = props or {}
95
95
+
77
96
local ext = require("vim._extui.shared")
78
97
local grepcmd = make_cmd(vim.o.grepprg)
79
98