-
Want to open recent() after projects() Tried this: projects = { confirm = function() Snacks.picker.recent() end } {
"<leader>pr",
function()
Snacks.picker.projects()
Snacks.picker.recent()
end,
desc = "Projects and Recent",
} |
Beta Was this translation helpful? Give feedback.
Answered by
maddawik
Jan 21, 2025
Replies: 1 comment 1 reply
-
There is probably a simpler way to go about this, but I was able to achieve this with the following {
"<leader>sp",
function()
Snacks.picker.projects({
finder = "recent_projects",
format = "file",
win = {
preview = {
minimal = true,
},
},
confirm = function(picker, item)
picker:close()
if item then
vim.schedule(function()
Snacks.picker.recent({
filter = {
cwd = Snacks.git.get_root(item.text),
},
finder = "recent_files",
format = "file",
})
end)
end
end,
})
end,
desc = "Projects and recent",
}
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
moukle
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is probably a simpler way to go about this, but I was able to achieve this with the following
key
: