Skip to content
Discussion options

You must be logged in to vote
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" },
  },
},

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sohanscript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants