farout.nvim/lua/lualine/themes/tokyonight.lua

59 lines
1.5 KiB
Lua
Raw Normal View History

2021-04-24 20:24:40 +00:00
local config = require("tokyonight.config")
local colors = require("tokyonight.colors").setup(config)
local util = require("tokyonight.util")
2021-04-19 12:38:50 +00:00
local tokyonight = {}
tokyonight.normal = {
2021-04-21 06:04:25 +00:00
a = { bg = colors.blue, fg = colors.black },
2021-04-19 12:38:50 +00:00
b = { bg = colors.fg_gutter, fg = colors.blue },
2021-04-21 06:04:25 +00:00
c = { bg = colors.bg_statusline, fg = colors.fg_sidebar },
2021-04-19 12:38:50 +00:00
}
2021-04-19 18:42:20 +00:00
2021-04-19 12:38:50 +00:00
tokyonight.insert = {
2021-04-21 06:04:25 +00:00
a = { bg = colors.green, fg = colors.black },
2021-04-20 10:19:20 +00:00
b = { bg = colors.fg_gutter, fg = colors.green },
2021-04-19 12:38:50 +00:00
}
2021-04-19 18:42:20 +00:00
2021-04-19 12:38:50 +00:00
tokyonight.command = {
2021-04-21 06:04:25 +00:00
a = { bg = colors.yellow, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.yellow },
2021-04-19 12:38:50 +00:00
}
2021-04-19 18:42:20 +00:00
2021-04-19 12:38:50 +00:00
tokyonight.visual = {
2021-04-21 06:04:25 +00:00
a = { bg = colors.magenta, fg = colors.black },
2021-04-20 16:00:27 +00:00
b = { bg = colors.fg_gutter, fg = colors.magenta },
2021-04-19 12:38:50 +00:00
}
2021-04-19 18:42:20 +00:00
2021-04-19 12:38:50 +00:00
tokyonight.replace = {
2021-04-21 06:04:25 +00:00
a = { bg = colors.red, fg = colors.black },
2021-04-19 12:38:50 +00:00
b = { bg = colors.fg_gutter, fg = colors.red },
}
2021-04-19 18:42:20 +00:00
2021-04-19 12:38:50 +00:00
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
2021-04-24 20:24:40 +00:00
for _, mode in pairs(tokyonight) do
for _, section in pairs(mode) do
2021-05-12 09:19:28 +00:00
if section.bg then
section.bg = util.getColor(section.bg)
end
if section.fg then
section.fg = util.getColor(section.fg)
end
2021-04-24 20:24:40 +00:00
end
end
end
if vim.g.tokyonight_lualine_bold then
for _, mode in pairs(tokyonight) do
mode.a.gui = "bold"
end
end
2021-04-19 12:38:50 +00:00
return tokyonight