Skip to content

Commit

Permalink
fix(diff): nvim_set_hl should use bg instead of background (yetone#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkunlin authored Aug 22, 2024
1 parent 4112eb1 commit ed3c5f1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lua/avante/diff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -502,18 +502,18 @@ local function set_highlights(highlights)
local current_color = Utils.get_hl(highlights.current)
local incoming_color = Utils.get_hl(highlights.incoming)
local ancestor_color = Utils.get_hl(highlights.ancestor)
local current_bg = current_color.background or DEFAULT_CURRENT_BG_COLOR
local incoming_bg = incoming_color.background or DEFAULT_INCOMING_BG_COLOR
local ancestor_bg = ancestor_color.background or DEFAULT_ANCESTOR_BG_COLOR
local current_bg = current_color.bg or DEFAULT_CURRENT_BG_COLOR
local incoming_bg = incoming_color.bg or DEFAULT_INCOMING_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 incoming_label_bg = Utils.colors.shade_color(incoming_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, INCOMING_HL, { background = 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, CURRENT_LABEL_HL, { background = current_label_bg, default = true })
api.nvim_set_hl(0, INCOMING_LABEL_HL, { background = incoming_label_bg, default = true })
api.nvim_set_hl(0, ANCESTOR_LABEL_HL, { background = ancestor_label_bg, default = true })
api.nvim_set_hl(0, CURRENT_HL, { bg = current_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, { bg = ancestor_bg, bold = true, default = true })
api.nvim_set_hl(0, CURRENT_LABEL_HL, { bg = current_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, { bg = ancestor_label_bg, default = true })
end

function M.setup()
Expand Down

0 comments on commit ed3c5f1

Please sign in to comment.