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

Replace tokyonight-day with background=light #248

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

WhyNotHugo
Copy link

@WhyNotHugo WhyNotHugo commented Oct 15, 2022

Drop tokyonight-day. Use vim.o.background=light instead.

Using vim.o.background also allows these pairs:

colorscheme tokyonight-night
set vim.o.background=light

# This is equivalent to tokyonight-day
colorscheme tokyonight-storm
set vim.o.background=light

colorscheme tokyonight-moon
set vim.o.background=light

My intent here is to simplify light mode a bit. Currently there's two distinct way to use a light mode; with vim.o.background (which gives three variants) or using the day theme (which allows using only the storm-light variant).

My goal with these changes is to eventually make it possible to define overrides that only apply when vim.o.background = "light". The way the day (a.k.a.: "storm+light") variant is special cased, makes this pretty tricky.

All-in-all, I feel this reduces completely while increases flexibility; there will only be one way of specifying that one wants a light variant, but the light variant for all three are usable.

Use `vim.o.background=light` instead.

Using `vim.o.background` also allows these pairs:

    colorscheme tokyonight-night
    set vim.o.background=light

    # This is equivalent to tokyonight-day
    colorscheme tokyonight-storm
    set vim.o.background=light

    colorscheme tokyonight-moon
    set vim.o.background=light
@wangl-cc
Copy link
Contributor

wangl-cc commented Nov 3, 2022

IMO, use the light variant of dark theme may not be a good choice, because some variant may not a good light mode. See #223, where the light theme is always the variant of current dark theme. Besides, The day theme is not variant of storm but night:

For me, I want to use storm as dark theme and day (variant of night) as light theme. I think this PR will make it impossible.

@WhyNotHugo
Copy link
Author

For me, I want to use storm as dark theme and day (variant of night) as light theme. I think this PR will make it impossible.

You can use the day variant of any of all three versions; it's in the commit message and PR description.

You want, as a dark theme:

colorscheme tokyonight-storm

And as a light theme:

colorscheme tokyonight-night
set vim.o.background=light

This PR makes all permutations possible (any dark with any light). You probably want an autocmd for event OptionSet with pattern background if you want to change the theme when the background changes.

@wangl-cc
Copy link
Contributor

wangl-cc commented Nov 3, 2022

Thanks for your reply. Autocmd for OptionSet is a possible solution.

This PR makes all permutations possible (any dark with any light).

Currently, all permutations possible is also possible by set light_style.

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.

None yet

2 participants