Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neovim display issue on Mac OS X

I usually using Neovim on my Linux configurations but today I have to use a Mac and I'm gonna have to use it for a moment ...

So I installed the package manager Homebrew and installed Neovim. I put my configuration (init.vim) and install Vim-Plug plugins manager. I installed my plugins, all worked fine !

When I restarted Neovim I had a display issue ... The background is blue.

There is the link to show the background problem: https://i.sstatic.net/qSvgw.jpg

There is my usual color scheme : https://github.com/rakr/vim-one/blob/master/screenshots/new-logo.png

Here's the part of the config file for the color scheme :

    Plug 'rakr/vim-one'
    autocmd ColorScheme one let g:airline_theme='one'

call plug#end()

if (empty($TMUX))
  if (has("nvim"))
  "For Neovim 0.1.3 and 0.1.4 < https://github.com/neovim/neovim/pull/2198 >
  let $NVIM_TUI_ENABLE_TRUE_COLOR=1
  endif
  "For Neovim > 0.1.5 and Vim > patch 7.4.1799 < https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 >
  "Based on Vim patch 7.4.1770 (`guicolors` option) < https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd >
  " < https://github.com/neovim/neovim/wiki/Following-HEAD#20160511 >
  if (has("termguicolors"))
    set termguicolors
  endif
endif

colorscheme one
set background=dark

I'm not an expert on Mac I must have missed something but I can't figure out what.

Some help would be really appreciated. If you need more details I remain at your disposal.

Thank you :)

like image 823
Hurobaki Avatar asked Dec 31 '25 13:12

Hurobaki


1 Answers

Unfortunately, the default terminal.app in Mac does not support true colors. If you have set termguicolors in your config, the colorscheme you use may be displayed wrongly. You have two options:

  • Stick with terminal.app and use set notermguicolors in your config.
  • Use other terminal applications which support true colors, such as iterm, kitty or alacritty. Set nvim to use true colors: set termguicolors
like image 174
jdhao Avatar answered Jan 04 '26 23:01

jdhao



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!