Skip to content
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

Neovim colorscheme vim doesn't match actual vim colorscheme nor terminal colors #1424

Open
cosmicAligator opened this issue Jul 11, 2024 · 5 comments

Comments

@cosmicAligator
Copy link

Whilst setting up a new computer running arch using the larbs script I found that the nvim colors did not appear as I recall them appearing on previous installs (I installed larbs on my primary machine at the start of this year and the colors in nvim are correct on there still). I installed vim and saw that the colors in vim were as I remember them. I checked that the line "colorscheme vim" is in ~/.config/nvim/init.vim and yet still the nvim colorscheme isn't the same as vim nor the system. I have not installed pywal. I have tried both leaving the gruvbox colorscheme commented out and uncommented in ~/.config/x11/xresources and neither changed the issue. I also tried both commenting and uncommenting the line "xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$!" in ~/.xprofile which also made no change even after rebooting.

The correct terminal colors appear to be set as they show when running neofetch. After searching online I am still at a loss as to what could be causing this issue given that it is a fresh install of both arch and larbs. Any help/advice would be much appreciated!

Ps. I attached screenshot with nvim on top left and vim on bottom left
github_issue_pic

@cosmicAligator cosmicAligator changed the title Neovim colorscheme vim doesn't match actual vim colorscheme nor system Neovim colorscheme vim doesn't match actual vim colorscheme nor terminal colors Jul 11, 2024
@TheYellowArchitect
Copy link
Contributor

There was a recent commit here which (succesfully?) addressed the bad color scheme.

As for my own setup on noticing the vim color was unlike the one I had by default in the past? On vimconfig file you have opened, I added colorscheme slate (you can add any colorscheme you want) then to make it transparent background: hi Normal guibg=NONE ctermbg=NONE

@cosmicAligator
Copy link
Author

I just read through #1413 and I have confirmed that all the changes made there are in my configs as I am working with a fresh install of larbs. It unfortunately does not resolve the issue. I appreciate the workaround @TheYellowArchitect and that does work for me to remove the bg from the preinstalled colorschemes which is nice.

However, the primary issue still stands and it also affects colors that are generated with pywal since from my understanding the way that pywal colors are applied to vim and nvim is through the colors-wal.vim file pywal creates in ~/.cache/wal which do get applied to vim, but for some reason not nvim even when colorscheme vim is set (see attached where the only difference is I ran wal --theme <path_to_personal_theme>). Whilst a small issue, it does mean that nvim doesn't match the rest of the system which is mildly annoying.

pywal

I also tried creating ~/.config/nvim/colors, moving the colors-wal.vim there and then manually calling the colorscheme, however this didn't work at all. My only other idea at this stage is that nvim doesn't like the syntax in colors-wal.vim and that I could just manually create a color scheme by replacing the colors in an existing scheme or smth.

@f-dutra
Copy link

f-dutra commented Aug 11, 2024

same issue here, i "fixed" it by downloading the xresources colorscheme made by nekonako and then adding the following lines in my init.vim to get the theme with transparent background:

Plug 'nekonako/xresources-nvim'

[...]

colorscheme xresources
hi Normal guibg=NONE ctermbg=NONE

make sure to put the lines in this order, or else it wont work

@BEST8OY
Copy link

BEST8OY commented Aug 27, 2024

@TheYellowArchitect
Yeah, I too still have the problem!
With that particular version I mentioned in my PR it was fixed and then suddenly it wasn't in the next release!

@lopomik7
Copy link

lopomik7 commented Oct 3, 2024

Putting export TERM=tmux-256color inside my .zshrc seems to have fixed it for me. Although for some reason, when opening a nvim buffer using shell script, it reverts it to the "faulty" colorscheme and not the ones that match the system. Not a big deal since I now have different colorschemes depending on how nvim was opened. Still a weird problem though since it wasn't like this last year when I was first trying out larbs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants