3
votes

Recently, I've configured my shell using base16 color scheme using this script: https://github.com/chriskempson/base16-shell/blob/master/scripts/base16-default-dark.sh. And Neovim's color scheme using: https://github.com/chriskempson/base16-vim.

Then I've set the following in ".vimrc" or more precisely .config/init/init.vim:

call plug#begin('~/.local/share/nvim/plugged')
Plug 'chriskempson/base16-vim'
...
set background=dark
let base16colorspace=256
colorscheme base16-default-dark

Everything works quite ok excerpt I can't change LineNumber column color but this is another story:

enter image description here

What I've realized is that when I switch to VT (tty) my colors are really messed up within Neovim. I see that VT or ($TERM=linux) supports only 8/16 colors which isn't the case when I under $TERM=screen/tmux/st(-256color). So the base16-shell schemes apply colors differently in accordance with $TERM. So the question is how to force Neovim (or the color scheme itself) be conscious of how applying the colors being under VT and X terminal?

1

1 Answers

7
votes

I've had the exact same problem. iTerm2 + fish + nvim + tmux + fzf. Everything worked great with base16-shell and base16-vim but the colors were messed up in nvim under tmux. Took me two days to figure it out. The following two tmux settings fixed it for me.

set -g  default-terminal "screen-256color"
# needed for proper nvim/tmux/base16 colors
set -ga terminal-overrides ",xterm-256color:Tc"

You might want to have a look at my dotfiles.