-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: highlight author in TODO(author):
#10
Comments
Sounds like a great idea. I'll add it to the list :) |
Is there a less hacky and more supported way of doing this then without stuff being swallowed? |
bumping this feature request because I am also looking for a way to do this. If there is any way I can help, let me know 🙂 |
While I enjoyed writing my TODO plugin, it was never great. Fortunately there's a better one out there. While it [doesn't yet support][support] highlighting keywords with things like authors or ticket numbers, it does pretty much everything else I'd want it to do. [support]: folke/todo-comments.nvim#10
just stumbled across this while trying to figure out how to achieve it - would love to see this be a feature out of the box |
I can confirm that this is fixed by #180 |
It'd be nice if #180 was merged into the master branch |
I have created a fork with the latest changes and added support for highlighting from #180 MR. You can find it here: https://github.com/ynhhoJ/todo-comments.nvim I will delete my fork once the main repository will merge these changes into the master branch. Feel free to use! |
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. |
Highlight the first capture group pattern, if there is a second (typically nested) capture group, use it for keyword matching. Allows highlighting `TODO(foo)` using `.*<((KEYWORDS)%(\(.{-1,}\))?):`. Closes #185, closes #10 This is similar to #180, however that PR's matching behaviour is not backwards compatible with the default highlight pattern used. This PR retains the behaviour that only the first capturing group is highlighted.
For completeness. It works now like this as shown in the PR. require("todo-comments").setup({
search = { pattern = [[\b(KEYWORDS)(\([^\)]*\))?:]] },
highlight = { pattern = [[.*<((KEYWORDS)%(\(.{-1,}\))?):]] },
}) |
It's quite common for a TODO to have an author, I was using treesitter comment parser and it can highlight the author name inside the parentheses. Currently I use both to make this happen but it would be cool if this plugin can do that as well, thanks! :)
here's a reference:

The text was updated successfully, but these errors were encountered: