fix(statusline): better statusline bg

This commit is contained in:
Matt Leong 2021-11-07 12:14:41 -08:00
parent ecf36ee938
commit f66766a2f4
3 changed files with 27 additions and 26 deletions

View file

@ -162,10 +162,10 @@ gls.left = {
local label, mode_color, mode_nested = unpack(m) local label, mode_color, mode_nested = unpack(m)
highlight('GalaxyViMode', mode_color, mode_nested) highlight('GalaxyViMode', mode_color, mode_nested)
highlight('GalaxyViModeInv', mode_nested, mode_color) highlight('GalaxyViModeInv', mode_nested, mode_color)
highlight('GalaxyViModeNested', mode_nested, colors.bg) highlight('GalaxyViModeNested', mode_nested, colors.bg_dark)
highlight('GalaxyViModeNestedInv', colors.bg, mode_nested) highlight('GalaxyViModeNestedInv', colors.bg_dark, mode_nested)
highlight('GalaxyPercentBracket', colors.bg, mode_color) highlight('GalaxyPercentBracket', colors.bg_dark, mode_color)
highlight('GalaxyText', colors.bg, mode_color) highlight('GalaxyText', colors.bg_dark, mode_color)
highlight('GalaxyGitLCBracket', mode_nested, mode_color) highlight('GalaxyGitLCBracket', mode_nested, mode_color)
@ -173,9 +173,9 @@ gls.left = {
highlight('GalaxyViModeBracket', mode_nested, mode_color) highlight('GalaxyViModeBracket', mode_nested, mode_color)
else else
if condition.check_git_workspace() then if condition.check_git_workspace() then
highlight('GalaxyGitLCBracket', colors.bg, mode_color) highlight('GalaxyGitLCBracket', colors.bg_dark, mode_color)
end end
highlight('GalaxyViModeBracket', colors.bg, mode_color) highlight('GalaxyViModeBracket', colors.bg_dark, mode_color)
end end
return ' ' .. label .. ' ' return ' ' .. label .. ' '
end, end,
@ -248,7 +248,7 @@ gls.left = {
provider = 'DiffAdd', provider = 'DiffAdd',
icon = '', icon = '',
condition = check_width_and_git_and_buffer, condition = check_width_and_git_and_buffer,
highlight = { colors.diffAdd, colors.bg }, highlight = { colors.diffAdd, colors.bg_dark },
}, },
}, },
{ {
@ -256,7 +256,7 @@ gls.left = {
provider = 'DiffModified', provider = 'DiffModified',
condition = check_width_and_git_and_buffer, condition = check_width_and_git_and_buffer,
icon = '', icon = '',
highlight = { colors.diffModified, colors.bg }, highlight = { colors.diffModified, colors.bg_dark },
}, },
}, },
{ {
@ -264,13 +264,13 @@ gls.left = {
provider = 'DiffRemove', provider = 'DiffRemove',
condition = check_width_and_git_and_buffer, condition = check_width_and_git_and_buffer,
icon = '', icon = '',
highlight = { colors.diffDeleted, colors.bg }, highlight = { colors.diffDeleted, colors.bg_dark },
}, },
}, },
{ {
WSpace = { WSpace = {
provider = 'WhiteSpace', provider = 'WhiteSpace',
highlight = { colors.bg, colors.bg }, highlight = { colors.bg_dark, colors.bg_dark },
}, },
}, },
} }
@ -287,8 +287,8 @@ gls.right = {
DiagnosticError = { DiagnosticError = {
provider = function() provider = function()
local error_result = diag.get_diagnostic_error() local error_result = diag.get_diagnostic_error()
highlight('GalaxyDiagnosticError', colors.error, colors.bg) highlight('GalaxyDiagnosticError', colors.error, colors.bg_dark)
highlight('GalaxyDiagnosticErrorInv', colors.bg, colors.error) highlight('GalaxyDiagnosticErrorInv', colors.bg_dark, colors.error)
if error_result ~= '' and error_result ~= nil then if error_result ~= '' and error_result ~= nil then
return error_result return error_result
@ -320,8 +320,8 @@ gls.right = {
DiagnosticWarn = { DiagnosticWarn = {
provider = function() provider = function()
local warn_result = diag.get_diagnostic_warn() local warn_result = diag.get_diagnostic_warn()
highlight('GalaxyDiagnosticWarn', colors.warn, colors.bg) highlight('GalaxyDiagnosticWarn', colors.warn, colors.bg_dark)
highlight('GalaxyDiagnosticWarnInv', colors.bg, colors.warn) highlight('GalaxyDiagnosticWarnInv', colors.bg_dark, colors.warn)
if warn_result ~= '' and warn_result ~= nil then if warn_result ~= '' and warn_result ~= nil then
return warn_result return warn_result
@ -352,8 +352,8 @@ gls.right = {
DiagnosticInfo = { DiagnosticInfo = {
provider = function() provider = function()
local info_result = diag.get_diagnostic_info() local info_result = diag.get_diagnostic_info()
highlight('GalaxyDiagnosticInfo', colors.info, colors.bg) highlight('GalaxyDiagnosticInfo', colors.info, colors.bg_dark)
highlight('GalaxyDiagnosticInfoInv', colors.bg, colors.info) highlight('GalaxyDiagnosticInfoInv', colors.bg_dark, colors.info)
if info_result ~= '' and info_result ~= nil then if info_result ~= '' and info_result ~= nil then
return info_result return info_result
@ -424,19 +424,19 @@ gls.short_line_left = {
{ {
GhostLeftBracketShort = { GhostLeftBracketShort = {
provider = BracketProvider(icons.rounded_left_filled, true), provider = BracketProvider(icons.rounded_left_filled, true),
highlight = { colors.white, colors.bg }, highlight = { colors.white, colors.bg_dark },
}, },
}, },
{ {
GhostShort = { GhostShort = {
provider = BracketProvider(main_icon, true), provider = BracketProvider(main_icon, true),
highlight = { colors.bg, colors.white }, highlight = { colors.bg_dark, colors.white },
}, },
}, },
{ {
GhostRightBracketShort = { GhostRightBracketShort = {
provider = BracketProvider(icons.rounded_right_filled, true), provider = BracketProvider(icons.rounded_right_filled, true),
highlight = { colors.white, colors.bg }, highlight = { colors.white, colors.bg_dark },
}, },
}, },
{ {
@ -452,7 +452,7 @@ gls.short_line_left = {
end, end,
highlight = { highlight = {
require('galaxyline.providers.fileinfo').get_file_icon, require('galaxyline.providers.fileinfo').get_file_icon,
colors.bg, colors.bg_dark,
}, },
}, },
}, },
@ -462,7 +462,7 @@ gls.short_line_left = {
condition = function() condition = function()
return condition.buffer_not_empty() and vim.bo.filetype ~= 'NvimTree' return condition.buffer_not_empty() and vim.bo.filetype ~= 'NvimTree'
end, end,
highlight = { colors.white, colors.bg }, highlight = { colors.white, colors.bg_dark },
}, },
}, },
{ {
@ -471,7 +471,7 @@ gls.short_line_left = {
condition = function() condition = function()
return condition.buffer_not_empty() and vim.bo.filetype ~= 'NvimTree' return condition.buffer_not_empty() and vim.bo.filetype ~= 'NvimTree'
end, end,
highlight = { colors.white, colors.bg }, highlight = { colors.white, colors.bg_dark },
}, },
}, },
} }
@ -481,7 +481,7 @@ gls.short_line_right = {
GitRootShortLeftBracket = { GitRootShortLeftBracket = {
provider = BracketProvider(icons.arrow_left_filled, true), provider = BracketProvider(icons.arrow_left_filled, true),
condition = condition.buffer_not_empty, condition = condition.buffer_not_empty,
highlight = { colors.white, colors.bg }, highlight = { colors.white, colors.bg_dark },
}, },
}, },
{ {
@ -489,14 +489,14 @@ gls.short_line_right = {
provider = get_git_root, provider = get_git_root,
condition = condition.buffer_not_empty, condition = condition.buffer_not_empty,
icon = ' ' .. icons.file .. ' ', icon = ' ' .. icons.file .. ' ',
highlight = { colors.bg, colors.white }, highlight = { colors.bg_dark, colors.white },
}, },
}, },
{ {
GitRootShortRightBracket = { GitRootShortRightBracket = {
provider = BracketProvider(icons.rounded_right_filled, true), provider = BracketProvider(icons.rounded_right_filled, true),
condition = condition.buffer_not_empty, condition = condition.buffer_not_empty,
highlight = { colors.white, colors.bg }, highlight = { colors.white, colors.bg_dark },
}, },
}, },
} }

View file

@ -9,6 +9,7 @@ local colors = {
white = themeColors.fg_dark, white = themeColors.fg_dark,
bg = themeColors.bg, bg = themeColors.bg,
bg_highlight = themeColors.bg_highlight, bg_highlight = themeColors.bg_highlight,
bg_dark = themeColors.bg_dark,
blue = themeColors.blue, blue = themeColors.blue,
purple = themeColors.magenta, purple = themeColors.magenta,
orange = themeColors.orange, orange = themeColors.orange,

View file

@ -57,7 +57,7 @@ highlight('NotifyTRACEIcon', nil, colors.trace)
-- terminal highlight -- terminal highlight
highlight('FloatermBorder', 'None', colors.floatBorder) highlight('FloatermBorder', 'None', colors.floatBorder)
highlight('StatusLine', 'Normal', 'Normal') highlight('StatusLine', colors.bg_dark, 'Normal')
vim.cmd([[ vim.cmd([[
highlight clear NormalFloat highlight clear NormalFloat