vim-airline / vim-airline-themes

A collection of themes for vim-airline
MIT License
2.04k stars 348 forks source link

Base16 theme changes command completion menu color after writing to files in Neovim #158

Closed jyzeng17 closed 5 years ago

jyzeng17 commented 5 years ago

OS: Ubuntu 16.04 Neovim: 0.3.0

I'm not sure if I should post it here, but it does not seem normal.

test

jyzeng17 commented 5 years ago

Btw I've tried other themes and they don't have this problem.

chrisbra commented 5 years ago

The problem is the statusline highlighting?

chrisbra commented 5 years ago

what base16 theme did you use?

jyzeng17 commented 5 years ago

Yeah the whole statusline is hightlighted when I press <Tab> to call the command completion menu. The appearances before and after I write something to the file are different. I set let g:airline_theme='base16' in my startup vim script.

chrisbra commented 5 years ago

I just tried in a standard Vim: grafik

What is your output of :hi WildMenu. Mine is

WildMenu       xxx term=standout cterm=bold ctermfg=161 ctermbg=237 gui=bold
               guifg=#df005f guibg=#3a3a3a

Please also check with a standard Vim installation.

chrisbra commented 5 years ago

Also please check if the 'termguicolors' setting changes anything

chrisbra commented 5 years ago

And finally, what colorscheme are you using? Try this: :verbose :hi WildMenu

jyzeng17 commented 5 years ago

I tested in my Vim and I found it behaves exactly as my Neovim does. Also I noticed that whether I start Vim with files argument or not will lead to different changes of my wildmenu color. I didn't set 'termguicolors' and I used gruvbox colorscheme when I tested, I'm not sure if this affects the result so I also tested with no colorscheme set.

chrisbra commented 5 years ago

hm, perhaps your terminal does not show more than 16 colors? Does :set t_Co=256 fix it?

chrisbra commented 5 years ago

Btw what terminal is this? When that happens (and the output is unreadable), what is the output of :hi WildMenu and :hi StatusLine?

jyzeng17 commented 5 years ago

My terminal is GNOME Terminal 3.18.3. :set t_Co=256 didn't fix it.

If I open a file with no colorscheme, the output of :hi WildMenu after color changing:

WildMenu       xxx term=standout ctermfg=0 ctermbg=11 guifg=Black guibg=Yellow

And the output of :hi StatusLine in the same condition:

StatusLine     xxx term=bold,reverse cterm=bold,reverse ctermfg=130 gui=bold,reverse

11111

chrisbra commented 5 years ago

I am struggeling a bit with following your conversation. That looks like the contrast between those two highlighting groups should be okay, so the problem mentioned in the first message should not show up in this circumstance, right? Or is this when the completion (wildmenu mode) is almost invisible?

jyzeng17 commented 5 years ago

Well I think my problem now is that my wildmenu will automatically change its color right after I write something to the file. The first message is just it happened to change its color to one that looks like invisible (I guess it's because of my gruvbox colorscheme setting, so I remove the setting for my last comment. And the problem exists still, just switch to another color). Here's the highlighting groups output for my first message's situation: 123

chrisbra commented 5 years ago

Hm, it looks like the Statusline highlighting group is wrong at least for the terminal. See how ctermfg equals ctermbg (this means the foreground color is the same as the background color for the terminal, note that you cannot see the xxx that should be present)?

Does this come from the gruvbox color scheme? Check :verbose :hi StatusLine. If that comes from gruvbox, I suggest filing an issue there.

jyzeng17 commented 5 years ago

123456

Looks like it's from vim-airline.

chrisbra commented 5 years ago

Now that is interesting. Ah found the problem and fixed it.

jyzeng17 commented 5 years ago

That solves the problem! Thank you.