feat: use background setting to determine light / dark theme #15

This commit is contained in:
Folke Lemaitre
2021-04-25 15:50:02 +02:00
parent 8041e49cf7
commit f7b4afbba2
5 changed files with 27 additions and 21 deletions

View File

@@ -36,11 +36,11 @@ tokyonight.inactive = {
c = { bg = colors.bg_statusline, fg = colors.fg_gutter },
}
if config.style == "day" then
if vim.o.background == "light" then
for _, mode in pairs(tokyonight) do
for _, section in pairs(mode) do
if section.bg then section.bg = util.getColor(section.bg, config) end
if section.fg then section.fg = util.getColor(section.fg, config) end
if section.bg then section.bg = util.getColor(section.bg) end
if section.fg then section.fg = util.getColor(section.fg) end
end
end
end