Open fedemp opened 8 years ago
my bad. closing.
@fedemp what was the problem and how did you fix it? :cold_sweat:
I'm getting weird colors under NVIM 0.1.2 with NVIM_TUI_ENABLE_TRUE_COLOR=1
but outside tmux:
The problem is that tmux does not support true color.
At least the latest official release. A patch was merged a couple of days ago that adds support for true color.
You can try to compile from source code to check if it works.
2016-02-18 17:15 GMT-03:00 Suraj N. Kurapati notifications@github.com:
@fedemp https://github.com/fedemp what was the problem and how did you fix it? [image: :cold_sweat:]
I'm getting weird colors under NVIM 0.1.2 with NVIM_TUI_ENABLE_TRUE_COLOR=1 too: [image: gruvbox-neovim-24bit] https://cloud.githubusercontent.com/assets/9863/13156793/17ef74e2-d639-11e5-97b6-92fe20a67151.png
— Reply to this email directly or view it on GitHub https://github.com/morhetz/gruvbox/issues/98#issuecomment-185896559.
Federico MP
@fedemp, apparently you didn't notice they're the one who got the patch to the mergeable state :p They also mentioned this is happening outside tmux.
@sunaku, looks good to me in termite. Is it possible your terminal doesn't support truecolor :p?
@fedemp Thanks for explaining. :+1: Sorry about the miscommunication: I had updated my comment afterwards to clarify that I could reproduce the problem outside of tmux. :sweat_smile:
@polyzen I'm using NeoVim 0.1.2 under st 0.6 which does indeed support 24-bit colors on my system:
@sunaku, Is it possible you're using a different colorscheme? Other shots of borked-gruvbox didn't quite look like this. Check to see :colorscheme
responds "gruvbox"
Nope, it's definitely Gruvbox. :disappointed_relieved: To be sure, I checked against the Yowish colorscheme in st and xterm:
Is your gruvbox on master?
Yes, I'm synced to commit 3f228101cdd5ae818415c7ebbcb42078c2476ea3, which is master currently. :confounded:
@fedemp does this happen for you in NeoVim directly under st?
Under st 0.6 and neovim, gruvbox uses the right colors.
As I said, the problem is that tmux does not support true color.
2016-02-19 4:22 GMT-03:00 Pavel Pertsev notifications@github.com:
Reopened #98 https://github.com/morhetz/gruvbox/issues/98.
— Reply to this email directly or view it on GitHub https://github.com/morhetz/gruvbox/issues/98#event-556195390.
Federico MP
@fedemp Thank you, got it! Reopened due to need of adding this case to documentation//faq and @sunaku 's somehow related issue.
Just for the record, today I compiled tmux (master branch) from source and true color is enabled.
Since I always use st, I just added this to this .tmux.conf: set-option -ga terminal-overrides ",st-256color:Tc"
. Source: https://sunaku.github.io/tmux-24bit-color.html#usage
As expected, I have same the problem inside the current tmux master (attached to st 0.6) too:
@fedemp What OS or Linux distro are you using? Perhaps this bug is specific to Void Linux's st package. :point_up:
An associate said it works for him with the same setup on Arch Linux.
https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/st
On Fri, Feb 19, 2016 at 3:30 PM, Suraj N. Kurapati <notifications@github.com
wrote:
As expected, I have same the problem inside the current tmux master (attached to st 0.6) too: [image: 2016-02-19-122439_724x388_scrot] https://cloud.githubusercontent.com/assets/9863/13188063/0334c0a4-d704-11e5-9116-a03ce25f778c.png
@fedemp https://github.com/fedemp What OS or Linux distro are you using? Perhaps this bug is specific toVoid Linux http://www.voidlinux.eu's st package. [image: :point_up:]
— Reply to this email directly or view it on GitHub https://github.com/morhetz/gruvbox/issues/98#issuecomment-186393798.
@sunaku Sorry, still got no idea what could cause this behaviour. Could you try checking any other term that supports true color mode so this weird issue could be definitely localized to the st package?
I tried compiling st from source myself (at commit 4fdba860c8db70035e9749806ecc6ca2d7c418d0) but no luck; the problem still occurs. I'll try asking in the st mailing list and also try a different terminal next.
I tried the libvte-based sakura terminal mentioned here :disappointed: but I still see the same problem:
$ sudo xbps-install sakura
Name Action Version New version Download size
vte install - 0.28.2_14 279KB
vte3 install - 0.42.4_1 161KB
sakura install - 3.3.4_1 48KB
Size to download: 490KB
Size required on disk: 2227KB
:relieved: Alas, it turns out that the problem was in my Vim config! :sweat_smile: I moved it away, cloned gruvbox as ~/.config/nvim
, and tried the repro: gruvbox now appears correctly (both in st and sakura)! :sparkles: :triumph:
The culprit was the https://github.com/zefei/vim-colortuner plugin, which had a ColorScheme autocommand that would run as soon as I entered :colorscheme gruvbox
and ruin the colors. :cop:
Disabling it on startup with let g:colortuner_enabled = 0
is enough to fix the problem though. :smiley_cat:
@sunaku Oh, I'm so glad you've localized this issue. I'll keep this opened till I've got the original tmux case added to the wiki.
I have the same question with the following settings:
.vimrc:
set termguicolors
set t_Co=256
set t_AB=^[[48;5;%dm
set t_AF=^[[38;5;%dm]]]]
highlight Normal ctermbg=black ctermfg=white
set background=dark
Plug 'morhetz/gruvbox'
colorscheme gruvbox
let g:gruvbox_contrast_dark = 'hard'
.tmux.conf:
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
Screenshot of Vim:
Screenshot of Vim inside Tmux:
Any ideas?
Try one or both of these:
set -g default-terminal "tmux-256color"
@polyzen Adding this lines crash my Vim
It's probably due to the escape characters. Try yanking them directly from :h xterm-true-color
, if you haven't already.
@azat-io
1) That's unrelated to the gruvbox
2) What's your terminal $TERM?
3) What's tmux version
4) try TERM=xterm-256color tmux
5) https://github.com/tmux/tmux/issues/696#issuecomment-268665191
@polyzen This code also not works for me:
if has("termguicolors") " set true colors
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
highlight Normal ctermbg=black ctermfg=white
set background=dark
Plug 'morhetz/gruvbox'
colorscheme gruvbox
let g:gruvbox_contrast_dark = 'hard'
@morhetz I'm using Tmux v2.5
azat@pc echo $TERM
xterm-256color
Adding this code to .tmux.conf
not works:
set -g default-terminal "tmux-256color-italic"
set-option -ga terminal-overrides ",tmux-256color-italic:Tc,xterm-256color-italic:Tc"
Could it be the highlight
line? I'm not familiar with that one.
Pretty sure the Plug
line doesn't belong there, but not relevant to this issue.
I don't understand why, but problem was solved with the following settings:
.vimrc
highlight Normal ctermbg=black ctermfg=white
set background=dark
Plug 'morhetz/gruvbox'
colorscheme gruvbox
let g:gruvbox_contrast_dark = 'hard'
.tmux.conf
set -g default-terminal "screen-256color"
I realized that reloading tmux conf after changing the default-terminal
and terminal-overrides
settings while a session is active results in that weird pink airline color and doesn't completely fix the problem. I had to actually kill my session and restart tmux from scratch to fix the issue. I don't know if anyone else is running into the same problem.
@masaeedu that's just how tmux works: You need to detach and reattach for terminal-overrides
to take effect. :neckbeard: Check out https://github.com/tmux/tmux/pull/112#issuecomment-150636074 and the origin of the Tc
attribute for reference.
When I change my terminal to urxvt
and install rxvt-unicode-256color
I've got a problems gruvbox does not show true color.
I fix it with by adding let g:gruvbox_termcolors = 16
before colorscheme gruvbox
and it works fine.
I'm using st which supports truecolor and also nvim.
I run
NVIM_TUI_ENABLE_TRUE_COLOR=1 nvim
and then select gruvbox.$TERM
istmux-256color
.