bug: keywords with no space before semi-colon don't show up in telescope
claf opened this issue · 5 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)
v0.9.4
Operating system/version
Ubuntu 22.04.4 LTS
Describe the bug
Using Lazyvim distro, when I search for todos (leader-s-t) I end up with a list of TODO/WARNING/NOTES/... that only matches keywords immediately followed by a semi-colon. Every occurrence of keywords with a space before semi-colon won't show up.
I've managed to get what looks to me like the desired behavior (feel free to correct me on that) by modifying the default configuration as follow :
in the config.lua file line 78, I've replaced :
pattern = [[\b(KEYWORDS):]], -- ripgrep regex
with
pattern = [[\b(KEYWORDS)\s*:]], -- ripgrep regex
I'm not an nvim configuration expert so please feel free to correct me if my reasoning or workaround is not valid.
Steps To Reproduce
- download latest lazyvim distro
- fire up nvim in a code directory where files contains some "TODO:" strings and some "TODO :" strings
- hit to search for TODOs in your code
- see only occurrence with no space between keyword and semi-colon
Expected Behavior
I think it is expected to show every occurrence of TODOs with and without space before semi-colon right?
Repro
No response
Now I have the feeling that this might be the expected behavior ... but keywords with a space before the semi-colon gets highlighted in editor so I'm a bit confused.