Added hlgroup for `diff` of lualine (#846)

* added higlightgroups for lualine to allow colorscheme to set colors for lualine

* chore: update docs for default diff color change

---------

Co-authored-by: Shadman <13149513+shadmansaleh@users.noreply.github.com>
This commit is contained in:
Ofir Gal 2023-08-03 10:01:10 +03:00 committed by GitHub
parent 05d78e9fd0
commit afece9bbf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -582,9 +582,9 @@ sections = {
colored = true, -- Displays a colored diff status if set to true
diff_color = {
-- Same color values as the general color option can be used here.
added = 'DiffAdd', -- Changes the diff's added color
modified = 'DiffChange', -- Changes the diff's modified color
removed = 'DiffDelete', -- Changes the diff's removed color you
added = 'LuaLineDiffAdd', -- Changes the diff's added color
modified = 'LuaLineDiffChange', -- Changes the diff's modified color
removed = 'LuaLineDiffDelete', -- Changes the diff's removed color you
},
symbols = {added = '+', modified = '~', removed = '-'}, -- Changes the symbols used by the diff.
source = nil, -- A function that works as a data source for diff.

View File

@ -19,21 +19,21 @@ local function apply_default_colors(opts)
added = {
fg = modules.utils.extract_color_from_hllist(
'fg',
{ 'GitSignsAdd', 'GitGutterAdd', 'DiffAdded', 'DiffAdd' },
{ 'LuaLineDiffAdd', 'GitSignsAdd', 'GitGutterAdd', 'DiffAdded', 'DiffAdd' },
'#90ee90'
),
},
modified = {
fg = modules.utils.extract_color_from_hllist(
'fg',
{ 'GitSignsChange', 'GitGutterChange', 'DiffChanged', 'DiffChange' },
{ 'LuaLineDiffChange', 'GitSignsChange', 'GitGutterChange', 'DiffChanged', 'DiffChange' },
'#f0e130'
),
},
removed = {
fg = modules.utils.extract_color_from_hllist(
'fg',
{ 'GitSignsDelete', 'GitGutterDelete', 'DiffRemoved', 'DiffDelete' },
{ 'LuaLineDiffDelete', 'GitSignsDelete', 'GitGutterDelete', 'DiffRemoved', 'DiffDelete' },
'#ff0038'
),
},