Skip to content
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: Make TodoTelescope ignore keywords that are not highlighted #314

Open
1 task done
Discusser opened this issue Aug 31, 2024 · 1 comment
Open
1 task done
Labels
enhancement New feature or request stale

Comments

@Discusser
Copy link

Did you check the docs?

  • I have read all the todo-comments.nvim docs

Is your feature request related to a problem? Please describe.

By default, todo-comments.nvim only highlights keywords that are in comments, so something like the following (see image) won't cause anything to be highlighted, which is totally expected. However, when running :TodoTelescope, those same lines that are not highlighted appear
image
image

Describe the solution you'd like

It would be nice if this plugin somehow didn't display the keywords that are not highlighted. That way, :TodoTelescope only displays the keywords that appear in comments. Perhaps there can be a (COMMENT) placeholder in the regex search pattern that gets expanded before searching.

Describe alternatives you've considered

I believe that ripgrep can be configured to use a different regex search pattern, so this might technically be already possible using a custom regex pattern, but that unfortunately doesn't give a solution that works for every language, and it would also probably be a complicated regex pattern.

Additional context

No response

@Discusser Discusser added the enhancement New feature or request label Aug 31, 2024
Copy link
Contributor

github-actions bot commented Oct 1, 2024

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.

@github-actions github-actions bot added the stale label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

1 participant