sainnhe / edge

Clean & Elegant Color Scheme inspired by Atom One and Material
MIT License
869 stars 56 forks source link

Theme doesn't work in standard terminal or iTerm2 #19

Closed Integralist closed 3 years ago

Integralist commented 3 years ago

I'm trying to use this theme but it's not displaying quite correctly in either macOS terminal app or even iTerm2 (I prefer to use terminal.app but thought I'd check iTerm2 to see if the colour palette was better supported there).

Screenshot 2020-12-16 at 11 59 26

I raised this same issue with another theme I wanted to try out (which appeared visually a lot more broken) and turns out the issue is with the terminal theme being used (see details here).

Vim in terminal mode must be used with a Nord terminal emulator theme in order to work properly! Vim in terminal mode uses the 16 color codes provided by the terminal emulator. When used with another color theme than the one provided by one of Nord's terminal emulator ports, the colors in Vim won't use Nord's color palettes! This will result in different styles than those defined by Nord Vim and could make it appear that there is a problem with the Nord Vim theme while the actual problem are missing Nord colors.

So my question is now, what terminal theme would you recommend I use (either iTerm2 or Terminal.app, preferably the latter) to get your vim theme to work more accurately?

sainnhe commented 3 years ago

It's true colors problem, I provided detailed debug steps in FAQ.

https://github.com/sainnhe/edge/blob/e40571b69c78f60b6acf0e7b3f1b008b5c72778a/doc/edge.txt#L296-L318

Integralist commented 3 years ago

So terminal.app doesn't quite have the true color support necessary, so I switched to iTerm2 which does support true color but I still had issues with it rendering the theme.

From the 4 items listed to check, I did the first three and the last item I kinda already have by virtue of setting my colorscheme using autocmd vimenter.

I'll keep digging, as it looks like most of the theme is ok with the exception of the background colour being almost black instead of purple like your README shows. Which makes me think the terminal's own theme is messing something up (as per Nord's suggestion to use their own terminal theme to avoid that issue).

ben-goldman commented 3 years ago

Hi, It looks like I am having the same/very similar issue. I am using neovim over tmux on alacritty for mac. I have verified that the terminal supports true color, but the vim colors still appear wrong.

image

Here is what my vimrc looks like with this color scheme:

image

Most of the colors look ok, except for the comments, where the background and foreground colors seem to be switched. Here is my tmux.conf:

image

It also looks like the sonokai colorscheme is having a similar problem, where certain highlight groups have the foreground and backgronud colors switched. Also, when I load files with macvim, or on neovim (with terminal) without tmux, the colors appear correct. Do you know what's going on?

This looks like a really amazing colorscheme, I would love to start using it! Thanks!

sainnhe commented 3 years ago

See FAQ, the comment color looks weird because your terminal emulator doesn't support italics. Use g:edge_disable_italic_comment to disable it.

ben-goldman commented 3 years ago

Thanks! All fixed! Looks great!