fix(diff): nvim_set_hl should use bg instead of background (#153)
This commit is contained in:
parent
4112eb1d4e
commit
ed3c5f10e9
@ -502,18 +502,18 @@ local function set_highlights(highlights)
|
|||||||
local current_color = Utils.get_hl(highlights.current)
|
local current_color = Utils.get_hl(highlights.current)
|
||||||
local incoming_color = Utils.get_hl(highlights.incoming)
|
local incoming_color = Utils.get_hl(highlights.incoming)
|
||||||
local ancestor_color = Utils.get_hl(highlights.ancestor)
|
local ancestor_color = Utils.get_hl(highlights.ancestor)
|
||||||
local current_bg = current_color.background or DEFAULT_CURRENT_BG_COLOR
|
local current_bg = current_color.bg or DEFAULT_CURRENT_BG_COLOR
|
||||||
local incoming_bg = incoming_color.background or DEFAULT_INCOMING_BG_COLOR
|
local incoming_bg = incoming_color.bg or DEFAULT_INCOMING_BG_COLOR
|
||||||
local ancestor_bg = ancestor_color.background or DEFAULT_ANCESTOR_BG_COLOR
|
local ancestor_bg = ancestor_color.bg or DEFAULT_ANCESTOR_BG_COLOR
|
||||||
local current_label_bg = Utils.colors.shade_color(current_bg, 60)
|
local current_label_bg = Utils.colors.shade_color(current_bg, 60)
|
||||||
local incoming_label_bg = Utils.colors.shade_color(incoming_bg, 60)
|
local incoming_label_bg = Utils.colors.shade_color(incoming_bg, 60)
|
||||||
local ancestor_label_bg = Utils.colors.shade_color(ancestor_bg, 60)
|
local ancestor_label_bg = Utils.colors.shade_color(ancestor_bg, 60)
|
||||||
api.nvim_set_hl(0, CURRENT_HL, { background = current_bg, bold = true, default = true })
|
api.nvim_set_hl(0, CURRENT_HL, { bg = current_bg, bold = true, default = true })
|
||||||
api.nvim_set_hl(0, INCOMING_HL, { background = incoming_bg, bold = true, default = true })
|
api.nvim_set_hl(0, INCOMING_HL, { bg = incoming_bg, bold = true, default = true })
|
||||||
api.nvim_set_hl(0, ANCESTOR_HL, { background = ancestor_bg, bold = true, default = true })
|
api.nvim_set_hl(0, ANCESTOR_HL, { bg = ancestor_bg, bold = true, default = true })
|
||||||
api.nvim_set_hl(0, CURRENT_LABEL_HL, { background = current_label_bg, default = true })
|
api.nvim_set_hl(0, CURRENT_LABEL_HL, { bg = current_label_bg, default = true })
|
||||||
api.nvim_set_hl(0, INCOMING_LABEL_HL, { background = incoming_label_bg, default = true })
|
api.nvim_set_hl(0, INCOMING_LABEL_HL, { bg = incoming_label_bg, default = true })
|
||||||
api.nvim_set_hl(0, ANCESTOR_LABEL_HL, { background = ancestor_label_bg, default = true })
|
api.nvim_set_hl(0, ANCESTOR_LABEL_HL, { bg = ancestor_label_bg, default = true })
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user