farout.nvim/lua/lualine/themes/tokyonight.lua
Francisco Lopes 933bd158ce
feat: add setting for bold A section of lualine (#68)
Upstream lualine themes have this section in bold, so provide an option
to have that.
2021-06-25 05:33:10 -07:00

59 lines
1.5 KiB
Lua

local config = require("tokyonight.config")
local colors = require("tokyonight.colors").setup(config)
local util = require("tokyonight.util")
local tokyonight = {}
tokyonight.normal = {
a = { bg = colors.blue, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.blue },
c = { bg = colors.bg_statusline, fg = colors.fg_sidebar },
}
tokyonight.insert = {
a = { bg = colors.green, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.green },
}
tokyonight.command = {
a = { bg = colors.yellow, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.yellow },
}
tokyonight.visual = {
a = { bg = colors.magenta, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.magenta },
}
tokyonight.replace = {
a = { bg = colors.red, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.red },
}
tokyonight.inactive = {
a = { bg = colors.bg_statusline, fg = colors.blue },
b = { bg = colors.bg_statusline, fg = colors.fg_gutter, gui = "bold" },
c = { bg = colors.bg_statusline, fg = colors.fg_gutter },
}
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)
end
if section.fg then
section.fg = util.getColor(section.fg)
end
end
end
end
if vim.g.tokyonight_lualine_bold then
for _, mode in pairs(tokyonight) do
mode.a.gui = "bold"
end
end
return tokyonight