Open fvall opened 1 month ago
meet this too pattern = [[\b(KEYWORDS)\(\w+\)?:]] cant work
I think this is due to the changes in this PR https://github.com/folke/todo-comments.nvim/pull/255
I updated my patterns to:
highlight = {
-- vimgrep regex, supporting the pattern TODO(name):
pattern = [[.*<((KEYWORDS)%(\(.{-1,}\))?):]],
},
search = {
-- ripgrep regex, supporting the pattern TODO(name):
pattern = [[\b(KEYWORDS)(\(\w*\))*:]],
},
And it's working again!
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.9.5
Operating system/version
Linux/PopOs
Describe the bug
Using the recommended options in the README file, I have amended the regex patters to suit my workflow. They were working just fine when I tested it with version 1.2.0. I have recently updated to v.1.3.0 and the highlight behaviour has changed, even though the regex patterns did not.
After playing a bit with the configuration, it seems to me the regex capturing groups are not working as they were previously. In my custom regex, I add a modifier to the capturing group, and I think that is causing the issue.
Steps To Reproduce
Switch between versions 1.2.0 and the latest one (as of writing it is 1.3.0) and check the Todo comments in the script below.
With version 1.2.0
TodoQuickFix
TodoTelescope
.With version 1.3.0
TodoQuickFix
TodoTelescope
Expected Behavior
I am not sure whether this is now the expected behaviour after version 1.3.0 or if it is indeed a bug. I read the release notes and I saw some comments about changing some of the regex logic. I also tried to change my regex to see if would resolve the issue, but it did not work either.
Repro