folke / todo-comments.nvim

✅ Highlight, list and search todo comments in your projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: Keywords aren't found

ToxyFlog1627 opened this issue · comments

Did you check docs and existing issues?

  • I have read all the todo-comments.nvim docs
  • I have searched the existing issues of todo-comments.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.8.3

Operating system/version

Linux Gentoo

Describe the bug

I have something like that in the file (I already know about semicolons - I have them, that's not the issue) :

// WARN: text
// PERF: text
// TEST: text
// TODO: text

Even though they highlight, they aren't showing up in any of the commands (TodoTelescope, TodoTrouble, TodoQuickFix, TodoLocList).
I have ripgrep installed and working and telescope also works with other plugins.

Also, maybe this will help somehow - changing colors in config doesn't have any effect.

Steps To Reproduce

Default config with todo-comments installed using Packer.

Expected Behavior

Keywords showing up in TodoTelescope, TodoTrouble, TodoQuickFix, TodoLocList.

Repro

No response

See the doc of rg :

Like other tools specialized to code search, ripgrep defaults to [recursive search]
(https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#recursive-search) and does [automatic filtering]
(https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#automatic-filtering). Namely, ripgrep won't search files
ignored by your .gitignore/.ignore/.rgignore files, it won't search hidden files and it won't search binary files. Automatic filtering
can be disabled with rg -uuu.

Perhaps are you looking for automatic filtered files?

Well, it's been a long time since I've last tried/tested, though AFAIK it was a folder with a few files without any ignores and without git repo

Ok.
I think another common pitfall comes when we edit with TODOS a config file (in hidden folder .config) from outside .config. In this case, we don't find TODOS unless we put --hidden arg in plugin Spec :

opts = {
    search = {
      args = {
        "--color=never",
        "--no-heading",
        "--with-filename",
        "--line-number",
        "--column",
	"--hidden",  -- new arg
      },
    },
    }

More generally, use "--hidden" to search through hidden folders or files.

You know what I've found out? I was so fucking stupid it's really hard to believe it. I indeed was doing it inside of gitignored folder while not realizing it.......
Thanks

EDIT: in fact I even overlooked it while answering your first comment about it being ignored, such a dumbass

😏 😉