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

fix(loader): respect empty colorscheme (#713) #1277

Closed
wants to merge 1 commit into from

Conversation

lbonn
Copy link

@lbonn lbonn commented Jan 16, 2024

This gives the option to not override default colorscheme during plugin installation by using the configuration:

{
    install = {
        colorscheme = {},
    },
}

If the user specifies a scheme or keeps the default, we will fall back to 'habamax' as before.

Note: the simple fix is to just remove the line and expect users to explicitly use ['theme1', 'habamax'] if needed but I tried to stay closer to the current semantics.

This gives the option to not override default colorscheme during plugin
installation by using the configuration:

```
{
    install = {
        colorscheme = {},
    },
}
```

If the user specifies a scheme or keeps the default, we will fall back
to 'habamax' as before.
@folke
Copy link
Owner

folke commented Jan 20, 2024

Just add "default" as the colorscheme you want to use?

@folke folke closed this Jan 20, 2024
@lbonn
Copy link
Author

lbonn commented Jan 20, 2024

@folke

Just add "default" as the colorscheme you want to use?

I have tried but reloading the "default" colorscheme resets background=dark, so it will render badly on a setup with background=light.

@tvsfx
Copy link

tvsfx commented Jan 23, 2024

I just ran into this; it would be nice if default retained the background setting when installing plugins.

@folke
Copy link
Owner

folke commented Jan 23, 2024

I agree. This should be fixed in Neovim. Lazy doesn't do anything special that resets the background or anything like that.

@folke
Copy link
Owner

folke commented Jan 23, 2024

Now that I think about it, what probably happens is that lazy loads the colorscheme before Neovim has determined the correct background. There's multiple issues related to this in the Neovim repo. Not really much I can do.

@lbonn
Copy link
Author

lbonn commented Jan 23, 2024

@folke there is nothing special with timing afaik, it also happens if :colorscheme default is invoked later which, I agree, is not great.

Actually, it's been fixed in neovim's tip where removed the set bg& in default.vim at the same time as they introduced a new default scheme (old default is vim.vim): neovim/neovim@574519d#diff-bddb1a5052ac511ac44f15f009566304ed3d9d7746609f9a2902235478f2b4cd

In the meantime, I think it is useful to have a way to configure lazyvim to not touch the colorscheme at all. But it's true it's only happening during the install phase and it's ultimately your call.

folke added a commit that referenced this pull request Jan 23, 2024
@folke
Copy link
Owner

folke commented Jan 23, 2024

When you now configure it to use "default", then it should work as expected. I simply don't load any colorscheme when "default"

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

Successfully merging this pull request may close these issues.

3 participants