feat: improved dealing with vim.o.background

This commit is contained in:
Folke Lemaitre
2022-09-10 09:35:41 +02:00
parent 54cf70dbd1
commit 6244df26b5
8 changed files with 47 additions and 30 deletions

View File

@@ -4,6 +4,17 @@ local config = require("tokyonight.config")
local M = {}
function M._load(style)
if style and not M._style then
M._style = require("tokyonight.config").options.style
end
if not style and M._style then
require("tokyonight.config").options.style = M._style
M._style = nil
end
M.load({ style = style, use_background = style == nil })
end
---@param opts Config|nil
function M.load(opts)
if opts then