Add option for :TodoTelescope to ignore dirs
Did you check the docs?
- [X] I have read all the todo-comments.nvim docs
Is your feature request related to a problem? Please describe.
TodoTelescope is useless in any Go project that vendors its deps because it shows the TODOs of all its deps
Describe the solution you'd like
Allow some ignore regex filepath, maybe. I could say I don't want it to search anything in vendor/
Describe alternatives you've considered
x
Additional context
No response
This can usually be achieved through the command you're using to search for TODO comments. By default todo-comments uses ripgrep, so you can ignore directories with the --glob flag. In my case, I'm ignoring files in the lib/ directory:
{
search = {
command = "rg",
args = {
"--glob=!lib/",
},
},
}
Unfortunately, I've found I needed to include the default flags as well, otherwise the output wouldn't be formatted in the way todo-comments expects:
{
search = {
command = "rg",
args = {
"--glob=!lib/",
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
},
}
This can usually be achieved through the command you're using to search for TODO comments. By default todo-comments uses ripgrep, so you can ignore directories with the
--globflag. In my case, I'm ignoring files in thelib/directory:{ search = { command = "rg", args = { "--glob=!lib/", }, }, }Unfortunately, I've found I needed to include the default flags as well, otherwise the output wouldn't be formatted in the way todo-comments expects:
{ search = { command = "rg", args = { "--glob=!lib/", "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", }, }, }
This solution is not working for me, I tried everything.
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.
This issue was closed because it has been stalled for 7 days with no activity.