refactor: refactored code to better deal with the day theme

This commit is contained in:
Folke Lemaitre
2022-09-05 14:06:03 +02:00
parent 3c05c5ad8e
commit dba4e35903
7 changed files with 84 additions and 67 deletions

View File

@@ -1,6 +1,6 @@
package.path = "./lua/?/init.lua;./lua/?.lua"
local config = require("tokyonight.config")
local config = require("tokyonight.config").options
local function write(str, fileName)
print("[write] extra/" .. fileName)
@@ -32,8 +32,7 @@ for extra, ext in pairs(extras) do
local plugin = require("tokyonight.extra." .. extra)
for style, style_name in pairs(styles) do
config.style = style
config = config or require("tokyonight.config")
local colors = require("tokyonight.colors").setup(config)
local colors = require("tokyonight.colors").setup({ transform = true })
local fname = extra .. "_tokyonight_" .. style .. "." .. ext
colors["_upstream_url"] = "https://github.com/folke/tokyonight.nvim/raw/main/extras/" .. fname
colors["_style_name"] = "Tokyo Night" .. style_name