2021-04-20 10:19:20 +00:00
|
|
|
-- shim vim for kitty and other generators
|
2021-05-02 08:16:56 +00:00
|
|
|
vim = vim or { g = {}, o = {} }
|
2021-04-20 10:19:20 +00:00
|
|
|
|
2021-04-19 12:39:35 +00:00
|
|
|
local function opt(key, default)
|
|
|
|
key = "tokyonight_" .. key
|
2021-05-12 09:19:28 +00:00
|
|
|
if vim.g[key] == nil then
|
|
|
|
return default
|
|
|
|
end
|
|
|
|
if vim.g[key] == 0 then
|
|
|
|
return false
|
|
|
|
end
|
2021-04-19 12:39:35 +00:00
|
|
|
return vim.g[key]
|
|
|
|
end
|
|
|
|
|
2022-09-03 21:47:25 +00:00
|
|
|
---@class Config
|
|
|
|
local config = {
|
2021-04-19 12:39:35 +00:00
|
|
|
style = opt("style", "storm"),
|
2021-05-19 06:49:33 +00:00
|
|
|
dayBrightness = opt("day_brightness", 0.3),
|
2021-04-19 12:39:35 +00:00
|
|
|
transparent = opt("transparent", false),
|
|
|
|
commentStyle = opt("italic_comments", true) and "italic" or "NONE",
|
|
|
|
keywordStyle = opt("italic_keywords", true) and "italic" or "NONE",
|
|
|
|
functionStyle = opt("italic_functions", false) and "italic" or "NONE",
|
2021-04-21 21:56:40 +00:00
|
|
|
variableStyle = opt("italic_variables", false) and "italic" or "NONE",
|
2021-04-19 12:39:35 +00:00
|
|
|
hideInactiveStatusline = opt("hide_inactive_statusline", false),
|
2021-04-20 09:58:45 +00:00
|
|
|
terminalColors = opt("terminal_colors", true),
|
2021-04-20 10:19:20 +00:00
|
|
|
sidebars = opt("sidebars", {}),
|
2021-04-23 18:21:12 +00:00
|
|
|
colors = opt("colors", {}),
|
2021-04-20 10:19:20 +00:00
|
|
|
dev = opt("dev", false),
|
2021-04-20 20:43:54 +00:00
|
|
|
darkFloat = opt("dark_float", true),
|
|
|
|
darkSidebar = opt("dark_sidebar", true),
|
2021-08-05 07:29:08 +00:00
|
|
|
transparentSidebar = opt("transparent_sidebar", false),
|
2021-05-02 08:43:18 +00:00
|
|
|
transform_colors = false,
|
2022-09-03 21:47:25 +00:00
|
|
|
borderlessTelescope = opt("borderless_telescope", true),
|
2021-06-25 12:33:10 +00:00
|
|
|
lualineBold = opt("lualine_bold", false),
|
2021-04-19 12:39:35 +00:00
|
|
|
}
|
2021-04-17 19:22:55 +00:00
|
|
|
|
2021-05-12 09:19:28 +00:00
|
|
|
if config.style == "day" then
|
|
|
|
vim.o.background = "light"
|
|
|
|
end
|
2021-04-25 13:50:02 +00:00
|
|
|
|
2021-04-17 19:22:55 +00:00
|
|
|
return config
|