tokyonight.nvim
tokyonight.nvim copied to clipboard
Replace tokyonight-day with `background=light`
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.
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:
https://github.com/folke/tokyonight.nvim/blob/29e2c689c10679f723ae1deadf7f0067d394a545/lua/tokyonight/colors.lua#L49
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.
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.
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.