-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Color name or number not recognized in Neovim (with notermguicolors set) #386
Comments
For me this issue occurs in neovim 0.9.0—it doesn't happen in 0.8.3 or lower, which indicates to me there might be something wrong with neovim and not the plugin. I'm not too sure about that though. |
For what it's worth, this also doesn't happen with Vim, and have even thought about switching because of this (though I'm not sure I'm ready to stop using neovim because of this one issue) |
I think this will probably get fixed in a later patch. Depending on what OS you're using, you can pretty easily downgrade neovim without losing much of anything (if at all), so it's no big deal. |
I am facing the same issue, in a fresh Neovim 0.9.0 with only vim-pandoc and vim-pandoc-syntax installed. In case it might be useful, I noticed that for some reason, the issue only appears when both plugins are installed, disabling vim-pandoc makes it disappear. |
Yeah I just checked that out. It seems like something might be wrong with vim-pandoc. Looking at this function, it looks like the color is defined elsewhere, though I don't know enough vimscript to really deal with this. if g:pandoc#syntax#style#emphases == 1
hi pandocEmphasis gui=italic cterm=italic
hi pandocStrong gui=bold cterm=bold
hi pandocStrongEmphasis gui=bold,italic cterm=bold,italic
hi pandocStrongInEmphasis gui=bold,italic cterm=bold,italic
hi pandocEmphasisInStrong gui=bold,italic cterm=bold,italic
if !exists('s:hi_tail')
let s:fg = '' " Vint can't figure ou these get set dynamically
let s:bg = '' " so initialize them manually first
for s:i in ['fg', 'bg']
let s:tmp_val = synIDattr(synIDtrans(hlID('String')), s:i)
let s:tmp_ui = has('gui_running') || (has('termguicolors') && &termguicolors) ? 'gui' : 'cterm'
if !empty(s:tmp_val) && s:tmp_val != -1
exe 'let s:'.s:i . ' = "'.s:tmp_ui.s:i.'='.s:tmp_val.'"'
else
exe 'let s:'.s:i . ' = ""'
endif
endfor
let s:hi_tail = ' '.s:fg.' '.s:bg
endif
exe 'hi pandocNoFormattedInEmphasis gui=italic cterm=italic'.s:hi_tail " <-- Line 693
exe 'hi pandocNoFormattedInStrong gui=bold cterm=bold'.s:hi_tail
endif Since |
Hey @PunkPhysicist and @xunam, what plugins are you two using? And what are you using to manage your plugins? For reference, I'm using Packer for management, and I'm using lualine, vim-pandoc, vim-pandoc-syntax, haskell-vim, julia-vim, rust.vim, vimtex, and SyntaxAttr.vim. |
I use Vundle for package management. And here is a list of plugins (copied from my vimrc):
|
I use vim-plug and created a minimal configuration for testing purposes, with only this: call plug#begin()
Plug 'vim-pandoc/vim-pandoc'
Plug 'vim-pandoc/vim-pandoc-syntax'
call plug#end() The problem appears, but only if both |
Alright, I know it's been two months since I've responded, but I managed to find a fix for this problem today—all you need to do is go into your colorscheme file and search for the color that neovim won't recognize (in this case |
That works in principle, but the problem is I use colorschemes from elsewhere (rather than defining my own). So I would need to manually patch any colorscheme I might use or only use only my own defined colors. Neither of which I would consider a solution |
Hello, It has been a year since the last message but the issue apparently still needs a reliable fix. I just wanted to share a simple temporary fix that works for me without patching colorschemes files: after setting the colorscheme in the exec 'hi String guifg=' . synIDattr(synIDtrans(hlID('String')), 'fg', 'cterm') The point is that, apparently, there is a bug that makes vim-pandoc-syntax fetch Hope this helps... |
I'm running Neovim and everytime I load vim-pandoc-syntax I get the error
This looks identical to the issue in here, except I explicitly do not have (or want) true color enabled, I.e., I have
set t_Co=16
in my config and even if I addset notermguicolors
I still get this error! Running in vim (with the same config) does not give me this error, only neovim.How can I make sure vim-pandoc-syntax doesn't assume true colors when I use Neovim?
The text was updated successfully, but these errors were encountered: