Skip to content
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

How to use 16-colours mode in Neovim? #71

Closed
lunacookies opened this issue Jun 26, 2019 · 4 comments
Closed

How to use 16-colours mode in Neovim? #71

lunacookies opened this issue Jun 26, 2019 · 4 comments

Comments

@lunacookies
Copy link

Hi, I see that recently Solarized 8 was updated so that the 16-colour mode is activated using set t_Co=16, rather than let g:solarized_use16 = 1. However, Neovim does not support t_* settings. Is there anyway to use the 16-colour mode in Neovim?

Thanks.

@lifepillar
Copy link
Owner

If there is no way for NeoVim to determine the number of colors of the underlying terminal, I may reinstate the old option.

But I'd like to understand: did they replace t_Co with something else? If not, what is the rationale to remove the setting (a link would be fine)?

@lifepillar
Copy link
Owner

Using NeoVim v0.4.0 I get:

:echo exists('&t_Co')
1
:echo &t_Co
256
:set t_Co=16
:echo &t_Co
256

So, it seems like they made the setting read-only. And removed the documentation about it.

@lifepillar
Copy link
Owner

I have played with Neovim a bit, and now things are clear to me: Neovim ignores t_Co and similar settings and detects terminal features automatically. Apparently, you cannot even lie to Neovim by setting the TERM environment variable.

I guess you want exact Solarized colors in terminals not supporting millions of colors. To achieve that in Neovim, I will need to reintroduce the old option, because Neovim always sets t_Co to 256.

@lunacookies
Copy link
Author

Thank you so much!

dfaught pushed a commit to dfaught/vim-solarized8 that referenced this issue Apr 17, 2023
Neovim ignores `&t_Co` and `&term`, so it is not possible in Neovim to
use the ANSI colors when `termguicolors` is not set.

Re-add this option to override the value of `s:t_Co`.

Fixes lifepillar#71.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants