gruvbox-community / gruvbox

Retro groove color scheme for Vim - community maintained edition
MIT License
805 stars 62 forks source link

Gruvbox not highlighting tabline selected tab (airline) #136

Open ravisumit33 opened 4 years ago

ravisumit33 commented 4 years ago

I have started using airline with gruvbox and noticed that tabline is not properly highlighted. Statusline is fine. Current tab is also not highlighted as seen below.

Screenshot 2020-06-01 at 10 35 10 PM

I am using Vim8.2 on iTerm Mac. Below is my minimal vimrc.

call plug#begin('~/.vim/plugged')

Plug 'vim-airline/vim-airline-themes'
Plug 'vim-airline/vim-airline'
Plug 'gruvbox-community/gruvbox'
Plug 'sheerun/vim-polyglot'
Plug 'dense-analysis/ale'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'ludovicchabant/vim-gutentags'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'preservim/nerdtree'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'airblade/vim-gitgutter'
Plug 'preservim/nerdcommenter'
Plug 'majutsushi/tagbar'
Plug 'ryanoasis/vim-devicons'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'luochen1990/rainbow'

call plug#end()

" For COC node
let g:coc_node_path="/Users/sumik/.nvm/versions/node/v14.2.0/bin/node"
syntax on

" Apply gruvbox colorscheme
autocmd vimenter * colorscheme gruvbox

" For ALE linting
let g:ale_sign_error = '✘'
let g:ale_sign_warning = '⚠'
highlight ALEErrorSign ctermbg=NONE ctermfg=red
highlight ALEWarningSign ctermbg=NONE ctermfg=yellow
let g:ale_set_highlights = 0

" Airline settings
let g:airline#extensions#ale#enabled = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1

I have searched issues on both airline and gruvbox but can't find any similar.

jweyrich commented 4 years ago

Same problem here. The tabline doesn't highlight the active buffer (I don't use tabs).

Here's the config that reproduces the issue on macOS using NVIM v0.4.3 on the default macOS Terminal:

call plug#begin('~/.config/nvim/plugged')
Plug 'morhetz/gruvbox', { 'tag': 'v3.0.1-rc.0' } " I use v3.0.1-rc.0 because it fixed colors for coc.nvim overlays, which I use with clangd.
Plug 'vim-airline/vim-airline'    
let g:airline_powerline_fonts = 1    
let g:airline_theme='gruvbox'  
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
let g:airline#extensions#tabline#show_tabs = 0
let g:airline#extensions#tabline#show_buffers = 1
call plug#end()
autocmd VimEnter * colorscheme gruvbox " Only change colorscheme after all plugins and configs are loaded.

Same result if I use Plug 'gruvbox-community/gruvbox'.

Here's how it looks: image

And here's how it should look like: image

The active buffer on the tabline should have a different color, as shown in the 2nd screenshot.

If I manually execute :colorscheme gruvbox and switch between buffers, the colors get fixed! I thought the autocmd VimEnter * colorscheme gruvbox was enough, but it looks like it is not.

Any hints on what could be the issue?

rbong commented 4 years ago

Unfortunately the airline config is likely out of date. PRs appreciated.

vejkse commented 1 year ago

A solution to this was found recently for everforest. I don’t really understand how themes work and didn’t succeed in adapting it to gruvbox, but perhaps someone more knowledgeable will see what to do: https://github.com/sainnhe/everforest/issues/105.