Closed dkasak closed 8 years ago
I don't understand. For never neovims, that support the 'termguicolor' setting, this line:
let s:term_true_color = ((has("nvim") && &termguicolors == 1) ||
\ (exists('+tgc') && &tgc))
that should return true. Shouldn't it? Now the real problem is, why does it fail in PreviewVimHighlight? What is in line 7?
Line 7 is highlight! link DiffChange DiffAdd
, since I used the above minimal vim config as both the configuration file for vim and the file I did :ColorToggle
in.
I don't understand. For never neovims, that support the 'termguicolor' setting, this line: [...] that should return true.
That's correct, and it does return true, but this is not what the line currently looks like in Colorizer. I was just saying I changed it to look like that in an attempt to fix my error, but it didn't fix it.
Yeah, I think, it doesn't work in Vim as well. Ah, it doesn't seem to take care of the '!' and the 'link' attribute. Will look into it. Thanks for noticing.
Thanks. Do you want me to make a pull request for handling the termguicolors
setting?
can you check with current head?
Thanks. Do you want me to make a pull request for handling the termguicolors setting?
Sorry, I don't understand. This will break colorizer for older neovims, doesn't it? If I don't care about older neovims, this should be changed to this I think:
let s:term_true_color = (exists('+tgc') && &tgc))
Ah, sorry, my brain totally missed that tgc
is actually termguicolors
. I can see now that it is already handled. Sorry for the noise.
Your fix works, thanks!
I'm getting an error when doing
:ColorToggle
on a vim config file containinghighlight
commands. I'm using neovim 0.1.5.I've managed to produce a minimal config file using only vim-plug (to install Colorizer) and Colorizer itself. The position in the error above is referring to the
highlight
line.Note that setting
termguicolors
is the new way to get truecolor support in neovim which supersedes the old way of setting$NVIM_TUI_ENABLE_TRUE_COLOR=1
. I've tried changing this line tobut it did not fix the error. Nevertheless, you should probably switch to it instead of using
NVIM_TUI_ENABLE_TRUE_COLOR
(or check for both, for backward compatibility).EDIT: I forgot to mention that Colorizer works perfectly with other things such as hex colors. It seems that just
highlight
commands are breaking it.