I’ve been using vim and nvim for quite a few years now.
Up until yesterday I’ve been using it with iTerm 2 with no problems. But yesterday I tried to install a prettier plugin, which I think caused me to upgrade some packages (I use Lazy for this), and my nvim colors totally broke. I’ve been through my fair share of color issues and always managed to fix them, but this time it’s been impossible.
I’ve distilled my symptoms to these simplified facts.
- When opened through iTerm2, no matter what color I set :hi Normal ctermbg to, nothing changes, even if running the command on an open vim session.
- Running nvim –clean doesn’t fix this.
- Running nvim on the default macOS terminal app fixes this problem, and everything works perfectly.
- Creating new a tmux session on the default macOs terminal app, and then opening tmux on iTerm2 also fixes this issue. On the other hand, if the tmux session is created on iTerm2 the issue remains.
- This happens only to nvim, not vim or any other console program.
So it seems that there is a difference on how iTerm2 and the default macOS app create a new bash session (I’m using bash), and this is maintained through tmux sessions. No idea how upgrading my packages through Lazy triggered this, and also no idea on how to debug it.
Anyone have any ideas? Thanks!