enhance: add more fallback colors for diff component

This commit is contained in:
shadmansaleh 2021-11-22 10:12:19 +06:00
parent 556d74a0df
commit 8725c63941
1 changed files with 15 additions and 3 deletions

View File

@ -14,13 +14,25 @@ local default_options = {
symbols = { added = '+', modified = '~', removed = '-' },
diff_color = {
added = {
fg = modules.utils.extract_highlight_colors('DiffAdd', 'fg') or '#90ee90',
fg = modules.utils.extract_color_from_hllist(
'fg',
{ 'GitSignsAdd', 'GitGutterAdd', 'DiffAdded', 'DiffAdd' },
'#90ee90'
),
},
modified = {
fg = modules.utils.extract_highlight_colors('DiffChange', 'fg') or '#f0e130',
fg = modules.utils.extract_color_from_hllist(
'fg',
{ 'GitSignsChange', 'GitGutterChange', 'DiffChanged', 'DiffChange' },
'#f0e130'
),
},
removed = {
fg = modules.utils.extract_highlight_colors('DiffDelete', 'fg') or '#ff0038',
fg = modules.utils.extract_color_from_hllist(
'fg',
{ 'GitSignsDelete', 'GitGutterDelete', 'DiffRemoved', 'DiffDelete' },
'#ff0038'
),
},
},
}