Skip to content
Discussion options

You must be logged in to vote

Should be doable, not tested properly:

---@module 'snacsk'

---@class snacks.Picker
---@field seen table<string, boolean?>

return {
  "folke/snacks.nvim",
  priority = 1000,
  lazy = false,
  ---@type snacks.Config
  opts = {
    picker = {
      sources = {
        lsp_references = {
          finder = function(opts, ctx)
            ctx.picker.seen = {}
            return require("snacks.picker.source.lsp").references(opts, ctx)
          end,
          transform = function(item, ctx)
            -- vim.print(item)
            local seen = ctx.picker.seen
            local id = vim.inspect({ item.text }) -- NOTE: Change
            if seen[id] then
              return false
            …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@impankratov
Comment options

@Danthewaann
Comment options

Answer selected by impankratov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants