简体   繁体   中英

Neovim color schemes fail on Mac terminal

Switching from Vim (on VSCode) to nvim on my Mac, I'm trying to change some color schemes.

However, when I change with :colorscheme <color> , the changes in the window don't reflect what they should.

I originally found this error while trying to load a separate color scheme from github and it didn't work, then tried others and builtin ones and they all are wrong:

Choosing a scheme: 选择方案

After chosen: 选择后

It seems all these default schemes are derivative of green highlight on white text on black background.

I figured it probably has something to do with Terminal preferences, but couldn't find any solutions.

Thanks!

So you are using the builtin terminal of macOS? If that is the case, probably because the builtin terminal does not support true colors. Get yourself a decent terminal emulator, like, kitty terminal, wezterm, iterm2.

Add the following to your config:

set termguicolors

Install a color scheme supporting true color, like gruvbox-material .

Switch to it colorsheme gruvbox-material . It should work.

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