Closed lekemula closed 8 months ago
Additionally, I don't know whether this is related but I noticed that TODO comments are not super visible when git diff-ing either, regardless of cursorline
or nocursorline
:
Thanks for the detailed report! π I'll look into this tomorrow.
I was able to reproduce. Below is a summary of what I observed.
Using the built-in habamax
colorscheme, the background color of the TODO tag remains untouched when cursorline
is set:
With gruvbox-material, the background appears the same way as in your screenshot (unsurprisignly):
In both cases the synstack is as follows:
:echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
['rubyComment', 'rubyTodo']
" rubyTodo links to Todo
" rubyComment links to Comment
The observed behaviour can be explained by the usage of cterm=reverse gui=reverse
in habamax, whereas gruvbox-material uses cterm=bold gui=bold
:
habamax
gruvbox-material
Using the reverse
attribute after swapping the values of fg
and bg
seems to yield the expected appearance:
:hi Todo term=standout cterm=reverse,bold ctermfg=109 ctermbg=235 gui=reverse,bold guifg=#7daea3 guibg=#282828
I have to evaluate the possible ramifications of using reverse
in the colorscheme. The problem seems to be Vim-specific and, in Neovim, TODO comments are displayed correctly without this attribute. A possible compromise would be to gate the attribute behind a conditional and set the highlight group differently on Vim and Neovim.
@lekemula this should now be solved, let us know if you're still running into similar issues π
Thank you for the lightning fix and for allowing me to enjoy this beautiful theme to the fullest! π π
I have done the following steps before reporting this issue:
Operating system/version
macOS Ventura Version 13.4
Terminal emulator/version
iTerm2 3.4.23
$TERM environment variable
screen-256color
Tmux version
tmux 3.3a
Feature matrix
Minimal vimrc that can reproduce this bug.
Steps to reproduce this bug using minimal vimrc
echo "# TODO: Some comment" > test.rb
vim test.rb -N -u .mini.vimrc
Expected behavior
The
TODO
should have the same highlighting when the cursor is not on the same line.Actual behavior
The
TODO
loses it's blue background and is barely visible when cursor is on the same line.