Skip to content
Discussion options

You must be logged in to vote

It uses grep finder under the hood (see https://github.com/folke/snacks.nvim/blob/main/docs/picker.md#grep)

---@field dirs? string[] directories to search
{
  '<space>st',
  function()
    local curr_path= vim.fn.expand '%:p'
    Snacks.picker.todo_comments { ---@diagnostic disable-line: undefined-field
      transform = function(item)
        local item_path = vim.fn.fnamemodify(item.cwd .. '/' .. item.file, ':p')
        return item_path == curr_path
      end,
    }
  end,
  desc = 'Todo',
},

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DominikMendel
Comment options

Answer selected by DominikMendel
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