Files
zenbones-theme/lua/zenbones/specs/init.lua

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.3 KiB
Lua
Raw Normal View History

local M = {}
function M.get_global_config(prefix, base_bg)
2021-10-20 15:35:17 +08:00
local common = {
solid_vert_split = vim.g[prefix .. "_solid_vert_split"],
2021-10-20 17:14:48 +08:00
solid_float_border = vim.g[prefix .. "_solid_float_border"],
2021-10-20 15:35:17 +08:00
comment_gui = vim.g[prefix .. "_italic_comments"] ~= false and "italic" or "NONE",
}
if base_bg == "light" then
if vim.g[prefix .. "_dim_noncurrent_window"] then
vim.notify(
prefix .. "_dim_noncurrent_window is replaced by " .. prefix .. "_darken_noncurrent_window",
vim.log.levels.ERROR,
{ title = "zenbones" }
)
end
2021-10-20 15:35:17 +08:00
return vim.tbl_extend("keep", {
lightness = vim.g[prefix .. "_lightness"],
darken_noncurrent_window = vim.g[prefix .. "_darken_noncurrent_window"],
2021-10-20 16:25:48 +08:00
darken_comments = vim.g[prefix .. "_darken_comments"],
2021-10-20 17:22:40 +08:00
darken_line_nr = vim.g[prefix .. "_darken_line_nr"],
2021-10-26 17:10:17 +08:00
darken_non_text = vim.g[prefix .. "_darken_non_text"],
2021-10-20 15:35:17 +08:00
}, common)
else
2021-10-20 15:35:17 +08:00
return vim.tbl_extend("keep", {
darkness = vim.g[prefix .. "_darkness"],
lighten_noncurrent_window = vim.g[prefix .. "_lighten_noncurrent_window"],
2021-10-20 16:25:48 +08:00
lighten_comments = vim.g[prefix .. "_lighten_comments"],
2021-10-20 17:22:40 +08:00
lighten_line_nr = vim.g[prefix .. "_lighten_line_nr"],
2021-10-26 17:10:17 +08:00
lighten_non_text = vim.g[prefix .. "_lighten_non_text"],
2021-10-20 15:35:17 +08:00
}, common)
end
end
function M.generate(p, base_bg, opt)
return require("zenbones.specs." .. base_bg)(p, opt)
end
return M