You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Disable highlight of TODO/NOTE but keep semantic highlighting enabled #1809
Semantic highlighting unfortunately makes TODO/NOTE/etc. strings in comments unreadable with the color scheme I use (https://github.com/rebelot/kanagawa.nvim), but it can be useful otherwise. Is there a way to prevent semantic highlighting from altering the coloring of these TODO/NOTE strings in comments while keeping it enabled?
@carsakiller:
That's the problem: If sumneko-lsp is disabled then TODO has different highlight, making it easy to tell at a glance, otherwise it's overriden and looks like regular comment.
Check this comparison (above: LSP enabled, below: disabled):
Color of it obviously depends on your colorscheme.
Is there a workaround for this in the meantime? I'm not very familiar with treesitter, but if there's a snippet I could include in my configuration for this language server that would be great.
Activity
carsakiller commentedon Jan 10, 2023
Can you provide a screenshot? I don't seem to get any highlighting for TODO/NOTE comments.

EtiamNullam commentedon Jan 10, 2023
@carsakiller:
That's the problem: If
sumneko-lspis disabled thenTODOhas different highlight, making it easy to tell at a glance, otherwise it's overriden and looks like regular comment.Check this comparison (above: LSP enabled, below: disabled):
Color of it obviously depends on your colorscheme.
You can see more details in the issue that I've submitted to a wrong language server:
iamcco/diagnostic-languageserver#86
carsakiller commentedon Jan 10, 2023
I see, so this is a request then to add semantic tokens for TODO and NOTE
sumneko commentedon Jan 12, 2023
I will try to reduce unnecessary semantic coloring for comments.
heygarrett commentedon Nov 9, 2024
Is there a workaround for this in the meantime? I'm not very familiar with treesitter, but if there's a snippet I could include in my configuration for this language server that would be great.
chrisgrieser commentedon Nov 9, 2024
@heygarrett if you are using nvim, this snippet disables highlighting of TODO-comments from the lsp, so you keep the lsp highlighting:
badosu commentedon Nov 1, 2025
I can confirm this issue still exists, the lsp token will have higher priority than the one defined by tree-sitter-comment.
The workaround has changed to: