feat: add options light_style (#231)
* feat: add options light_style * add default and docs for light_style
This commit is contained in:
parent
4092905fc5
commit
df281cc0f1
@ -134,6 +134,7 @@ require("tokyonight").setup({
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
style = "storm", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
|
||||
light_style = "day", -- The theme is used when the background is set to light
|
||||
transparent = false, -- Enable this to disable setting the background color
|
||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||
styles = {
|
||||
|
@ -99,7 +99,8 @@ function M.setup(opts)
|
||||
opts = opts or {}
|
||||
local config = require("tokyonight.config")
|
||||
|
||||
local palette = M[config.options.style] or {}
|
||||
local style = config.is_day() and config.options.light_style or config.options.style
|
||||
local palette = M[style] or {}
|
||||
if type(palette) == "function" then
|
||||
palette = palette()
|
||||
end
|
||||
|
@ -5,6 +5,7 @@ local M = {}
|
||||
---@field on_highlights fun(highlights: Highlights, colors: ColorScheme)
|
||||
local defaults = {
|
||||
style = "storm", -- The theme comes in three styles, `storm`, a darker variant `night` and `day`
|
||||
light_style = "day", -- The theme is used when the background is set to light
|
||||
transparent = false, -- Enable this to disable setting the background color
|
||||
terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim
|
||||
styles = {
|
||||
|
Loading…
Reference in New Issue
Block a user