diff --git a/README.md b/README.md index c0034e20..e8c43651 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,8 @@ require("gruvbox").setup({ invert_signs = false, invert_tabline = false, invert_intend_guides = false, - inverse = true, -- invert background for search, diffs, statuslines and errors + invert_diff = false, + inverse = true, -- invert background for search, statuslines and errors contrast = "", -- can be "hard", "soft" or empty string palette_overrides = {}, overrides = {}, diff --git a/lua/gruvbox.lua b/lua/gruvbox.lua index ceba0735..8a187ab4 100644 --- a/lua/gruvbox.lua +++ b/lua/gruvbox.lua @@ -60,6 +60,7 @@ Gruvbox.config = { invert_signs = false, invert_tabline = false, invert_intend_guides = false, + invert_diff = false, inverse = true, contrast = "", palette_overrides = {}, @@ -360,9 +361,9 @@ local function get_groups() PmenuSel = { fg = colors.bg2, bg = colors.blue, bold = config.bold }, PmenuSbar = { bg = colors.bg2 }, PmenuThumb = { bg = colors.bg4 }, - DiffDelete = { bg = colors.dark_red }, - DiffAdd = { bg = colors.dark_green }, - DiffChange = { bg = colors.dark_aqua }, + DiffDelete = config.invert_diff and { fg = colors.bg0, bg = colors.red } or { bg = colors.dark_red }, + DiffAdd = config.invert_diff and { fg = colors.bg0, bg = colors.green } or { bg = colors.dark_green }, + DiffChange = config.invert_diff and { fg = colors.bg0, bg = colors.aqua } or { bg = colors.dark_aqua }, DiffText = { bg = colors.yellow, fg = colors.bg0 }, SpellCap = { link = "GruvboxBlueUnderline" }, SpellBad = { link = "GruvboxRedUnderline" },