snacks.nvim icon indicating copy to clipboard operation
snacks.nvim copied to clipboard

feature: todo_comments for current file

Open kocv59 opened this issue 9 months ago • 6 comments

Did you check the docs?

  • [x] I have read all the snacks.nvim docs

Is your feature request related to a problem? Please describe.

In the example it opens all the todo comments in the project.

{
  "folke/todo-comments.nvim",
  optional = true,
  keys = {
    { "<leader>st", function() Snacks.picker.todo_comments() end, desc = "Todo" },
    { "<leader>sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" },
  },
}

Describe the solution you'd like

An argument to Snacks.picker.todo_comments() to show todos in the current file only.

Describe alternatives you've considered

Grep for TODO comments.

Additional context

No response

kocv59 avatar Mar 04 '25 02:03 kocv59

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Apr 04 '25 02:04 github-actions[bot]

This is nice feature to bring to snacks.nvim, IMO

jellydn avatar Apr 04 '25 02:04 jellydn

@m-over Read the issue before commenting.

kocv59 avatar Apr 25 '25 18:04 kocv59

You can just call :lua Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" }, dirs = {vim.api.nvim_buf_get_name(0)} }) and it should show only the current buffer. I did some non-extending testing and it seems to work. Hope I didn't miss anything else. Just bind it to a mapping of your choice.

dpetka2001 avatar Apr 25 '25 20:04 dpetka2001

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar May 26 '25 02:05 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jun 02 '25 02:06 github-actions[bot]