use sort_lastused in Snacks.picker.smart
#2680
Answered
by
drowning-cat
sohanscript
asked this question in
Q&A
Replies: 1 comment
smart = {
title = "Smart ass",
multi = { "buffers", "files" },
transform = function(item, ctx)
if require("snacks.picker.transform").unique_file(item, ctx) == false then
return false
end
item.buf_lastused = item.info and item.info.lastused or 0
end,
sort = {
fields = { "buf_lastused:desc", "score:desc", "#text", "idx" },
},
}, |
0 replies
Answer selected by
sohanscript
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Is there any way to sort the buffers in the smart picker by last used??
All reactions