todo-comments.nvim
todo-comments.nvim copied to clipboard
[BUG] Wrong highlighting when appending a comment before a todo
The for in the next image shouldn't be highlighted, and it isn't when I reload the file. The reason it highlights is because I just added an extra comment above it. The todo highlight probably needs to be updated when a line is appended above or something...
Wrong:
Correct:
What I have observed is that deleting lines above the comment is not messing things up. However, if you add one or more lines above the highlighted comment, the highlight is activated on the line below a "TODO"-like comment. Inserting characters on the line with a "TODO" like comment fixes the highlight for the particular line (as does reloading of the buffer as @ThomasFrans mentioned)
I'm on neovim 0.8.0
This also breaks the code highlighting:
This does not fix for non-treesister based highlighting.
@judaew are you sure? I don't think the issue happens for non-treesitter highlighting. The issue is cause by the async nature of teesitter. We render the highlights before treesitter knows a certain node is a comment.
I have this problem with judaew/macports.nvim which does not use treesister.
Just FYI: This is now fixed.