简体   繁体   中英

Solarized in NeoVim on iTerm 1 and 2 has incorrect background for dark theme

I'm trying to use the Solarized theme for vim in NeoVim. However, despite setting the background to "dark" and confirming it's set to dark, the solarized background color is a very light grey, almost white color. Setting background=light only adjusts the color of text.

I'm using iTerm2 (but had this issue with iTerm 1 and thought switching might fix). And I'm using the solarized dark theme in the iTerm2 profile. I also have the CSApprox plugin installed. I've confirmed both &t_Co=256 and term=xterm-256colors . I've noticed background colors being slightly off for other themes as well.

Solved this one myself. After verifying this wasn't an issue by using vim instead of NeoVim, the problem was I was not using NeoVim TrueColor support.

Enabling this using the environment variable NVIM_TUI_ENABLE_TRUE_COLOR=1 . Adding

export NVIM_TUI_ENABLE_TRUE_COLOR=1

to my .bash_profile fixed the issue. All schemes now look as advertised.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM