Not working on Neovim
taq opened this issue · comments
I just got an error when running this plugin on Neovim. Seems that there is an error on the hex2rgb
function, because is not send an hex value there. I forced synIDattr
to use the gui
mode (last parameter) and the error stopped, but I still can't have the dimmed parts of the code.
Hello? :-)
The error only occurs when termguicolors
is set. But it works fine on regular Vim with the option.
colo seoul256
echo synIDattr(synIDtrans(hlID('Normal')), 'fg#')
" vim: 252, nvim: 252
set termguicolors
echo synIDattr(synIDtrans(hlID('Normal')), 'fg#')
" vim: #d9d9d9, nvim: 252
@justinmk Any idea why I see different results?
Maybe is Neovim returning it wrong?
Does regular Vim has the set termguicolors
?
Yes.
vim/vim@61be73b
When are you calling set termguicolors
?
nvim --cmd 'set termguicolors' -c "put =synIDattr(synIDtrans(hlID('Normal')), 'fg#')"
Inserts #f8f8f2
for me. set termguicolors
must be called during startup (in your vimrc/init.vim), not after. This is a nvim limitation (documented at :help 'termguicolors'
).
Hey, using set termguicolors
on startup worked, thanks!