Open Masber opened 1 month ago
Thanks for reporting. The screenshots likely show a difference in syntax matching, not in highlight group colors. Neovim and Vim have significantly different syntax files for many languages, including VimScript. Gruvbox does not define syntax match patterns, it just maps colors to highlight groups.
See the Neovim VimScript syntax file:
" Note: Be careful when merging the upstream version of this file.
" Much of this is generated by scripts/genvimvim.lua
You could also be using the Treesitter highlight groups in Neovim, in which case colors would be even more different and out of our control.
If you are using the syntax files though, you can use this function to find the highlight match under the cursor:
function! SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc
You can use that to find the specific highlight group names that don't match, then use the :highlight <group-name>
command to view which colors are mapped to that group. This might clear up some of the differences.
That all said, we currently have customized highlight groups for the original Vim version of the VimScript syntax groups, not some of the new Neovim vimscript syntax groups. If someone wants to contribute a PR for the Neovim VimScript syntax groups, I would accept it, though for the most part it seems correct.
However, the idea behind this ticket - that they should be "exactly the same" - is likely impossible, unless if Vim merges the Neovim syntax group changes for some reason. For instance, the Vim syntax match patterns make highlighting all punctuation impossible last time I checked, where in Neovim they are mapped exactly (on that note: I think your screenshots have Vim/Neovim flipped).
If you do find some fundamental difference in how Gruvbox is mapping groups to colors or want to rephrase your issue, please let me know. But otherwise this ticket can be closed because we have little to no control over making Neovim and Vim exactly the same.
Dear gruvbox community,
I noticed gruvbox-community/gruvbox looks slightly different in vim and neovim.
VIM
NVIM
I installed guvbox in vim using Plug
And in neovim using lazy
I also tried this trick
But still not as the original
I also tried
ellisonleao/gruvbox.nvim
but it is totally different (it adds italics and the colors are quite different)Any idea how to make gruvbox in nvim to look the same as in vim?
thank you