morhetz / gruvbox

Retro groove color scheme for Vim
13.71k stars 1.1k forks source link

gruvbox breaks terminal colors #379

Closed toraritte closed 3 years ago

toraritte commented 3 years ago

The issue

My default terminal look:

image

will turn into this in the Vim terminal:

image

The in-vim terminal colorscheme may actually change to a uniform white text color when opening a new terminal.

How I got here?

Running NixOS and this happened after upgrading to the latest NixOS version which automatically upgrades all packages; the last time I did this was around March 2020, no issues then.

Things tried

The only plugins I have are

        commentary
        fastfold
        fugitive
        fzf-vim
        goyo
        limelight-vim
        repeat
        surround
        tabular
        undotree
        vim-airline
        vim-airline-themes
        vim-bufferline
        vim-elixir
        vim-obsession

and this issue only disappears when gruvbox is removed (or installed but Vim is reloaded without ever setting to the gruvbox colorscheme).

This thread is exactly my issue, but it is for GVim, and it does not apply in my case (or it does, but I wasn't doing something right).

Also tried changing g:gruvbox_termcolors (taken from #4) but it had no effect at all.

When I run :runtime syntax/hitest.vim (taken from this thread), I can't even find the shade of very dark blue from the second image (the one before "toraritte"). This is the output.

This thread also seems relevant, especially the part mentioning gruvbox

UPDATE: After using the procedure above to diagnose the issue, we noticed that the cause of the problem was the server-side .zshrc file gruvbox_256palette_osx.sh, which modifies the color palette of the terminal when executed.

The server side has $TMUX unset so the gruvbox script was not using the proper escape sequences, getting the color palette out of sync and producing the difference in colors that was observed here.

but my problem is consistent regardless if tested in tmux or not.


This thing drives me crazy and any pointers would be appreciated!

toraritte commented 3 years ago

Just realized that this should've been opened in the gruvbox-community...