add transparency support for statuslines #222

v2.5
siduck 2 years ago
parent f1ad901512
commit 1a3faca5fd

@ -18,6 +18,10 @@ elseif statusline_theme == "vscode_colored" then
light_grey = generate_color(colors.light_grey, 25) light_grey = generate_color(colors.light_grey, 25)
end end
if config.transparency then
statusline_bg = "NONE"
end
local Lsp_highlights = { local Lsp_highlights = {
St_lspError = { St_lspError = {
fg = colors.red, fg = colors.red,
@ -200,39 +204,39 @@ M.vscode_colored = {
M.minimal = { M.minimal = {
StatusLine = { StatusLine = {
bg = colors.black, bg = "none",
}, },
St_gitIcons = { St_gitIcons = {
fg = generate_color(light_grey, 8), fg = generate_color(light_grey, 8),
bg = colors.black, bg = "none",
bold = true, bold = true,
}, },
-- LSP -- LSP
St_lspError = { St_lspError = {
fg = colors.red, fg = colors.red,
bg = colors.black, bg = "none",
}, },
St_lspWarning = { St_lspWarning = {
fg = colors.yellow, fg = colors.yellow,
bg = colors.black, bg = "none",
}, },
St_LspHints = { St_LspHints = {
fg = colors.purple, fg = colors.purple,
bg = colors.black, bg = "none",
}, },
St_LspInfo = { St_LspInfo = {
fg = colors.green, fg = colors.green,
bg = colors.black, bg = "none",
}, },
St_LspProgress = { St_LspProgress = {
fg = colors.green, fg = colors.green,
bg = colors.black, bg = "none",
}, },
St_LspStatus_Icon = { St_LspStatus_Icon = {
@ -242,7 +246,7 @@ M.minimal = {
St_EmptySpace = { St_EmptySpace = {
fg = colors.black, fg = colors.black,
bg = colors.black, bg = "none",
}, },
St_EmptySpace2 = { St_EmptySpace2 = {
@ -250,38 +254,21 @@ M.minimal = {
}, },
St_file_info = { St_file_info = {
bg = colors.black,
fg = colors.white, fg = colors.white,
bg = "none",
}, },
St_file_sep = { St_file_sep = {
bg = colors.black,
fg = colors.black, fg = colors.black,
bg = "none",
}, },
St_sep_r = { St_sep_r = {
bg = colors.black,
fg = colors.one_bg, fg = colors.one_bg,
bg = "none",
}, },
} }
local hlgroups_minimal_glassy = {
"St_lspError",
"St_lspWarning",
"St_LspHints",
"St_gitIcons",
"St_LspInfo",
"St_EmptySpace",
"St_LspProgress",
"St_sep_r",
}
if config.transparency then
for _, value in ipairs(hlgroups_minimal_glassy) do
M.minimal[value].bg = "NONE"
end
end
-- add common lsp highlights -- add common lsp highlights
M.default = merge_tb("force", M.default, Lsp_highlights) M.default = merge_tb("force", M.default, Lsp_highlights)
M.vscode_colored = merge_tb("force", M.vscode_colored, Lsp_highlights) M.vscode_colored = merge_tb("force", M.vscode_colored, Lsp_highlights)

Loading…
Cancel
Save