`rustCommentLineDoc` doesn't work
dmyTRUEk opened this issue · comments
Describe the bug
Changing rustCommentLineDoc
doesn't change rust doc comments color.
To Reproduce
Steps to reproduce the behavior:
- Set
rustCommentLineDoc = { link = 'GruvboxOrange' }
in config, like this:
require('gruvbox').setup {
overrides = {
rustCommentLineDoc = { link = 'GruvboxOrange' },
}
}
- Open any rust file with doc comments.
- Doc comment's color is gray, not
GruvboxOrange
, as was expected.
Expected behavior
Doc comments in rust to be GruvboxOrange
color.
Additional context
Neovim v0.9.0
ellisonleao/gruvbox.nvim version: e685aeb
@dmyTRUEk can you verify if the semantic highlight group (@lsp.*
) is being applied by calling :Inspect
with the cursor over the comment string please?
Output of the :Inspect
command on both file header and doc comment:
Treesitter
- @comment.rust links to Comment rust
- @spell.rust links to @spell rust
- @comment.documentation.rust links to Comment rust
Semantic Tokens
- @lsp.type.comment.rust links to Comment priority: 125
- @lsp.mod.documentation.rust links to @lsp priority: 126
- @lsp.typemod.comment.documentation.rust links to @lsp priority: 127
and on the (simple, plain) comment:
Treesitter
- @comment.rust links to Comment rust
- @spell.rust links to @spell rust
Semantic Tokens
- @lsp.type.comment.rust links to Comment priority: 125
So as I understand semantic highlight group (@lsp.*
) is applied on all three comment types.
Have you tried setting:
require('gruvbox').setup {
overrides = {
['@comment.rust'] = { link = 'GruvboxOrange' },
['@lsp.type.comment.rust'] = { link = 'GruvboxOrange' },
}
}
I tried
require('gruvbox').setup {
overrides = {
['@comment.rust'] = { link = 'GruvboxYellow' },
['@lsp.type.comment.rust'] = { link = 'GruvboxOrange' },
}
}
(set different colors to differentiate them) but with this configuration:
- at first few seconds (while rust-analyzer (rust's language server) is loading):
- doc comments - gray
- simple comments - GruvboxYellow
- and after few seconds (when rust-analyzer is loaded):
- doc comments - GruvboxOrange (as desired)
- simple comments - GruvboxOrange (not as desired)
After some tweaking i found that this works as desired:
require('gruvbox').setup {
overrides = {
['@lsp.type.comment.rust'] = { link = 'GruvboxYellow' },
['@lsp.typemod.comment.documentation.rust'] = { link = 'GruvboxOrange' },
}
}
With this configuration:
- at first few seconds (while rust-analyzer is loading):
- doc comments - gray
- simple comments - gray
- and after few seconds (when rust-analyzer is loaded):
- doc comments - GruvboxOrange (as desired)
- simple comments - GruvboxYellow (as desired)
So then rustCommentLineDoc
is broken (because it doesn't change doc comments color), right?