A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/challenger-deep-theme/vim/issues/18 below:

macOS + alacritty + tmux + vim = color issue · Issue #18 · challenger-deep-theme/vim · GitHub

I just ran into some coloring issue that I wanted to share, and perhaps contribute some troubleshooting tips in the docs.

Problem

When using vim in alacritty & tmux on macOS, colors were completely off in vim:

I was not able to replicate the issue using iTerm2 + tmux + vim.

Here are the relevant settings I had for alacritty, tmux, and vim:

Alacritty

Per the official repo:

# ...

# challenger deep
colors:
  # Default colors
  primary:
    background: '0x1b182c'
    foreground: '0xcbe3e7'

  # Normal colors
  normal:
    black:   '0x100e23'
    red:     '0xff8080'
    green:   '0x95ffa4'
    yellow:  '0xffe9aa'
    blue:    '0x91ddff'
    magenta: '0xc991e1'
    cyan:    '0xaaffe4'
    white:   '0xcbe3e7'

  # Bright colors
  bright:
    black:   '0x565575'
    red:     '0xff5458'
    green:   '0x62d196'
    yellow:  '0xffb378'
    blue:    '0x65b2ff'
    magenta: '0x906cff'
    cyan:    '0x63f2f1'
    white:   '0xa6b3cc'
Tmux
# ... 

set-option -g default-terminal "xterm-256color"

# ...

Note: I'm not using the official tmux theme. See my dotfiles for the full config.

vim

Per the official repo:

" ...
Plug 'https://github.com/challenger-deep-theme/vim', { 'as': 'ChallengerDeep' }
" ...

if has('nvim') || has('termguicolors')
  set termguicolors
endif

colorscheme challenger_deep

" ...
Solution

Research led me to this reddit thread.

What solved it for me was setting the following tmux config option:

# ...

set-option -g default-terminal "xterm-256color"
+ set-option -ga terminal-overrides ',xterm-256color:Tc'

# ...

Here is what vim looks like in alacritty + tmux on macOS now:

Wabri, AlecGoncharow, hisamafahri and chalop


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4