Skip to content

Commit 3426ac6

Browse files
committed
fix(base): improve diff highlights
1 parent f817781 commit 3426ac6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lua/astrotheme/groups/base.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---@type AstroThemeCallback
22
local function callback(c, opts)
3+
local color = require "astrotheme.lib.color"
4+
local base = color.new(c.ui.base)
35
return {
46
--------------------
57
--- Normal
@@ -123,10 +125,10 @@ local function callback(c, opts)
123125
--------------------
124126
--- Diagnostics
125127
--------------------
126-
DiffAdd = { fg = c.ui.base, bg = c.syntax.green },
127-
DiffChange = { fg = c.ui.base, bg = c.syntax.yellow },
128-
DiffDelete = { fg = c.ui.base, bg = c.syntax.red },
129-
DiffText = { fg = c.ui.base, bg = c.syntax.yellow },
128+
DiffAdd = { bg = color.new(c.syntax.green):blend(base, 0.75):tohex() },
129+
DiffChange = { bg = color.new(c.syntax.yellow):blend(base, 0.75):tohex() },
130+
DiffDelete = { bg = color.new(c.syntax.red):blend(base, 0.75):tohex() },
131+
DiffText = { bg = color.new(c.syntax.yellow):blend(base, 0.7):tohex() },
130132
DiffAdded = { fg = c.syntax.green },
131133
DiffRemoved = { fg = c.syntax.red },
132134
DiffChanged = { fg = c.syntax.blue },

0 commit comments

Comments
 (0)