sonph / onehalf

Clean, vibrant and pleasing color schemes for Vim, Sublime Text, iTerm, gnome-terminal and more.
MIT License
1.78k stars 236 forks source link

Terminal suggestion color not honored #54

Closed protex closed 1 year ago

protex commented 5 years ago

I use the zsh-autosuggestions plugin on iterm2. When typing a command in iterm, a suggestion is displayed in a lighter font color like so:

test

However, this lighter colored text doesn't show up when using the dark theme in a neovim terminal tab:

test

The images aren't so great but, the difference is very noticeable to the eye.

The text does show up when using the onehalflight version, but it's just plain back. I presume that this is what's happening with the onehalfdark theme, it's just that it doesn't show up due to the similarity of color with the background.

protex commented 5 years ago

I was able to get the background text to show up by setting the g:terminal_color_8 to a lighter color of "black" than the version specified in the colors file. This works as a temporary workaround, but it would be nice if the terminalcolor[0-7] and terminalcolor[8-15] were slightly different to avoid problems like this.

sonph commented 5 years ago

The text does show up when using the onehalflight version, but it's just plain back.

This is because the color for your suggestion text is set as black, so it shows up as black in both dark and light themes. Compare this to setting it as foreground, which will show up as black in the light theme and as white in the dark theme.

when using the dark theme in a neovim terminal tab

Does this only happen in the terminal in neovim? Perhaps this is because neovim is piping the color from zsh to the terminal? Do you have true colors enabled in neovim?

junzebao commented 3 years ago

I just switched to onehalfdark for both my iterm2 and neovim, and suddenly my zsh-autosuggestions are not showing up. After checking their wiki, I found out it's because the ANSI bright color is the same as the background color (https://github.com/zsh-users/zsh-autosuggestions#suggestion-highlight-style). I changed the ANSI bright color to a lighter one so it works again.