farout.nvim/lua/tokyonight/init.lua

32 lines
681 B
Lua
Raw Normal View History

2021-04-17 19:22:55 +00:00
local util = require("tokyonight.util")
local theme = require("tokyonight.theme")
local config = require("tokyonight.config")
2021-04-17 19:22:55 +00:00
2021-04-20 11:39:38 +00:00
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
require("tokyonight.config").extend(opts)
end
2021-05-12 09:19:28 +00:00
util.load(theme.setup())
end
2021-04-20 11:39:38 +00:00
M.setup = config.setup
-- keep for backward compatibility
M.colorscheme = M.load
2021-04-20 11:39:38 +00:00
return M