diff --git a/lua/tokyonight/theme.lua b/lua/tokyonight/theme.lua index d116979..9495869 100644 --- a/lua/tokyonight/theme.lua +++ b/lua/tokyonight/theme.lua @@ -405,6 +405,8 @@ function M.setup(config) LightspeedGreyWash = { fg = c.dark3 }, } + theme.defer = {} + if config.hideInactiveStatusline then local inactive = { style = "underline", bg = c.bg, fg = c.bg, sp = c.border } @@ -413,7 +415,7 @@ function M.setup(config) -- LuaLine for _, section in ipairs({ "a", "b", "c" }) do - theme.plugins["lualine_" .. section .. "_inactive"] = inactive + theme.defer["lualine_" .. section .. "_inactive"] = inactive end end diff --git a/lua/tokyonight/util.lua b/lua/tokyonight/util.lua index b13412b..710a333 100644 --- a/lua/tokyonight/util.lua +++ b/lua/tokyonight/util.lua @@ -238,6 +238,10 @@ function util.load(theme) util.syntax(theme.plugins) util.terminal(theme.colors) util.autocmds(theme.config) + + vim.defer_fn(function() + util.syntax(theme.defer) + end, 100) end ---@param config Config @@ -245,7 +249,9 @@ end function util.color_overrides(colors, config) if type(config.colors) == "table" then for key, value in pairs(config.colors) do - if not colors[key] then error("Color " .. key .. " does not exist") end + if not colors[key] then + error("Color " .. key .. " does not exist") + end -- Patch: https://github.com/ful1e5/onedark.nvim/issues/6 if type(colors[key]) == "table" then @@ -259,7 +265,9 @@ function util.color_overrides(colors, config) colors[key] = value else -- another group - if not colors[value] then error("Color " .. value .. " does not exist") end + if not colors[value] then + error("Color " .. value .. " does not exist") + end colors[key] = colors[value] end end