-
Notifications
You must be signed in to change notification settings - Fork 60
Colours come out with when running in NeoVim with termguicolors. #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could this be related to #35? I'll have a look at this later today. |
As it turns out, this does not seem to be a bug with srcery! So here's what (I think) I figured out. Normally, when running Vim, the colorscheme loads something like hi Normal ctermfg=15 ctermbg=0 guifg=#FCE8C3 guibg=#1C1B19 What Vim does with this is that it takes the
There are 256 colors available to use like this. This works. The
However, this is not supported by Terminal.app. I'm guessing that |
Could be it, Emacs does something similar when presented with color hexes in terminal. It tries to conform it to the 256 color space. I'm not sure its tmux that's doing it, I'm guessing its Neovim. Either way this is expected behavior. Have you tried the same thing in a true color terminal? |
I actually confirmed it's tmux that is mapping the 24-bit colors. If I run NeoVim in a 24-bit capable terminal, it works fine with both I found a script to generate a rainbow, and it looks like this: However, when running it in tmux, the output looks like such: It's possible to force tmux not to do this. Tmux is actually the reason that running NeoVim in Terminal.app with If you have a 24-bit capable terminal emulator and you want to use 24-bit colors Force set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc" Tell vim to use 24-bit colors set termguicolors I also had to set TERM manually. It's kinda messy. But it works: Maybe this could be useful to someone? Not sure. Interesting to learn how this stuff all works, tho. |
This is with Terminal.app? With kitty I have no issues AFAIK. The rainbow shows fine. With set -g default-terminal 'xterm-kitty' Ed1t: You know the motto: learn by doing. 😉 |
turns out I got this snippet in my tmux conf set -ga terminal-overrides ",xterm-termite:Tc"
set -g default-terminal "tmux-256color" no issue with the rainbow. Seems I just copy pasted this from the arch linux wiki, and promptly forgot about it. Should we add a note in the readme about this maybe? |
That code is a standard snippet I've seen a couple of places.. A notice could help more people to detect it. |
fa4a618 Added, close this? |
For some reason, when using NeoVim, and having
set termguicolors
enabled, the colors don't come out right. Here's what I mean:This is in NeoVim, with

notermguicolors
set. Looks as it should.This is in NeoVim, with

termguicolors
set. Looks slightly wrong. Note especially the reddish colour of the "bright_white".The text was updated successfully, but these errors were encountered: