onehalf icon indicating copy to clipboard operation
onehalf copied to clipboard

Terminal suggestion color not honored

Open protex opened this issue 5 years ago • 3 comments

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 avatar Jun 17 '19 18:06 protex

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 terminal_color_[0-7] and terminal_color_[8-15] were slightly different to avoid problems like this.

protex avatar Jun 17 '19 20:06 protex

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?

sonph avatar Jun 21 '19 04:06 sonph

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.

junzebao avatar Jun 25 '21 13:06 junzebao