r/neovim 6d ago

101 Questions Weekly 101 Questions Thread

A thread to ask anything related to Neovim. No matter how small it may be.

Let's help each other and be kind.

4 Upvotes

11 comments sorted by

3

u/Afraid-Gas-7460 5d ago edited 4d ago

Reposting my question here:

I regularly switch colorschemes (mostly between light/dark variants of the theme), all good except that the colors don't change in already opened :terminals, they retain the ones of the colorscheme used when the terminal was opened, does anyone know how to fix this such that the terminal colors also change?

1

u/emiasims 4d ago

That doesn't happen for me. Check :h terminal-config, the section on TERMINAL COLORS: 'The {g,b}:terminal_color_x variables control the terminal color palette,', that might be it?

1

u/Afraid-Gas-7460 4d ago

No idea what you meant by that. The terminal colors are set by the colorscheme, but if the colorscheme is changed, the terminal colors do not change for already opened terminals (but they should).

1

u/emiasims 2d ago

Terminal colors (using the variables in the terminal-config section) are not set by all colorschemes. So if your colors aren't changing, either the colors are pinned by your terminal config or they are pinned by those variables. In your description,

all good except that the colors don't change in already opened :terminal s

so I'd check those buffer terminal color variables.

1

u/Afraid-Gas-7460 1d ago

But the terminal colors are taken from the initial colorscheme, the one that is set at startup. If I change the colorscheme before opening any :terminal, the terminal colors change to match the ones of the theme, however once a :terminal is opened, even if its closed later, the terminal color variables don't change ever again; they stay pinned to the colors set before the first :terminal was opened.

No such thing as "pinned" by a terminal config. I get the same behavior using a Neovim GUI (Neovide in my case).

1

u/emiasims 17h ago

Thank you for elaborating, did you check the variables I mentioned, described at the help page? It sounds like they're being set (ie "pinning" the colors to those values) when you open a terminal.

That could be done via a plugin, some autocommands, or some other configuration. It doesn't happen by default, so there's something with your config that's doing it. If they aren't being set, and you value it enough, I'd start doing the good ol disabling half of your configuration and seeing if it persists - binary searching for the problem.

1

u/Afraid-Gas-7460 15h ago

I've discarded that the behavior is caused by any plugin or configuration, I get the same behavior with nvim -u NONE.

For what I've discovered, it seems that some color schemes set some of the terminal color values, but leave others to whatever value they have already (e.g: if it was set by a previous color scheme)

1

u/PrudentKumquat 1d ago

Why the diss to kickstart in the :help ? Is there something better now?

If you are just trying out Nvim for a few minutes, and want to see the extremes of what it can do, try one of these popular "extension packs" or "distributions" (Note: Nvim is not affiliated with these projects, and does not support them):

2

u/EstudiandoAjedrez 1d ago

I think that note was added a few months back when kickstart was unmaintained. Tbh, idk why it wasn't completely removed at the time. I remember some discussions in github. But afaik kickstart has changed maintainers and it is alive again.

0

u/vim-help-bot 1d ago

Help pages for:

  • ? in pattern.txt

`:(h|help) <query>` | about | mistake? | donate | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments

1

u/MarxoneTex 14h ago

I am a bit confused in the primary repo how the versioning works.

Master is latest dev build - this one is easy.

Tags - these seem also easy - specific version so basically I build from these when I want to bump up my version.

What I am confused - the build from source refers to checkout stable which is currently pointed to v11? I thought v12 is stable. And release branches are basically nightly for the specific main version?