How to use snack.picker.todo_comments for the current file? #1910
Answered
by
drowning-cat
DominikMendel
asked this question in
Q&A
-
I don't see any configuration options for like a |
Beta Was this translation helpful? Give feedback.
Answered by
drowning-cat
May 24, 2025
Replies: 1 comment 1 reply
-
It uses ---@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',
}, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
DominikMendel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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