Skip to main content
Avante.nvim defines custom highlight groups for UI elements. All highlights can be customized using nvim_set_hl().

Title Highlights

Highlight groups for various title elements.
GroupDescriptionDefault
AvanteTitleMain title barfg=#1e222a bg=#98c379
AvanteReversedTitleReversed title (for borders)fg=#98c379 bg=NormalFloat
AvanteSubtitleSubtitle (selected code title)fg=#1e222a bg=#56b6c2
AvanteReversedSubtitleReversed subtitlefg=#56b6c2 bg=NormalFloat
AvanteThirdTitlePrompt titlefg=#ABB2BF bg=#353B45
AvanteReversedThirdTitleReversed third titlefg=#353B45 bg=NormalFloat
AvanteConfirmTitleConfirm dialog titlefg=#1e222a bg=#e06c75
Source: lua/avante/highlights.lua:9-14, 21

Conflict & Diff Highlights

Highlight groups for code conflicts and diffs.
GroupDescriptionDefaultConfig Override
AvanteConflictCurrentCurrent version highlightbg=#562C30 boldhighlights.diff.current
AvanteConflictCurrentLabelCurrent version labelShaded version of current-
AvanteConflictIncomingIncoming changes highlightbg=#314753 boldhighlights.diff.incoming
AvanteConflictIncomingLabelIncoming changes labelShaded version of incoming-
Default Configuration:
highlights = {
  diff = {
    current = "DiffText",  -- or nil to use defaults
    incoming = "DiffAdd",  -- or nil to use defaults
  },
}
Example Customization:
-- Use custom highlight groups
vim.api.nvim_set_hl(0, 'AvanteConflictCurrent', { bg = '#3d2a2e', bold = true })
vim.api.nvim_set_hl(0, 'AvanteConflictIncoming', { bg = '#2a3d3d', bold = true })

-- Or override via config
require('avante').setup({
  highlights = {
    diff = {
      current = "DiffDelete",
      incoming = "DiffChange",
    },
  },
})
Source: lua/avante/highlights.lua:71-76, lua/avante/config.lua:595-600

UI Element Highlights

Highlight groups for UI elements.
GroupDescriptionDefault
AvantePopupHintUsage hints in popup menuslink=NormalFloat
AvanteInlineHintEnd-of-line hint in visual modelink=Keyword
AvanteSuggestionSuggestion textlink=Comment
AvanteAnnotationAnnotation textlink=Comment
AvanteToBeDeletedCode marked for deletionbg=#ffcccc strikethrough
AvanteToBeDeletedWOStrikethroughDeletion without strikethroughbg=#562C30
Source: lua/avante/highlights.lua:15-20

Button Highlights

Highlight groups for button elements.
GroupDescriptionDefault
AvanteButtonDefaultDefault buttonfg=#1e222a bg=#ABB2BF
AvanteButtonDefaultHoverDefault button hoverfg=#1e222a bg=#a9cf8a
AvanteButtonPrimaryPrimary buttonfg=#1e222a bg=#ABB2BF
AvanteButtonPrimaryHoverPrimary button hoverfg=#1e222a bg=#56b6c2
AvanteButtonDangerDanger buttonfg=#1e222a bg=#ABB2BF
AvanteButtonDangerHoverDanger button hoverfg=#1e222a bg=#e06c75
Source: lua/avante/highlights.lua:22-27

Input & Border Highlights

Highlight groups for input elements.
GroupDescriptionDefault
AvantePromptInputPrompt input bodyNo defaults
AvantePromptInputBorderPrompt input borderlink=NormalFloat
Source: lua/avante/highlights.lua:28-29
Highlight groups for sidebar windows.
GroupDescriptionDefault
AvanteSidebarWinSeparatorVertical separatorfg=NormalFloat.bg bg=NormalFloat
AvanteSidebarWinHorizontalSeparatorHorizontal separatorfg=WinSeparator bg=NormalFloat
AvanteSidebarNormalSidebar backgroundlink=NormalFloat
Source: lua/avante/highlights.lua:30-39

State & Spinner Highlights

Highlight groups for spinner states.
GroupDescriptionDefault
AvanteStateSpinnerGeneratingGenerating statefg=#1e222a bg=#ab9df2
AvanteStateSpinnerToolCallingTool calling statefg=#1e222a bg=#56b6c2
AvanteStateSpinnerFailedFailed statefg=#1e222a bg=#e06c75
AvanteStateSpinnerSucceededSuccess statefg=#1e222a bg=#98c379
AvanteStateSpinnerSearchingSearching statefg=#1e222a bg=#c678dd
AvanteStateSpinnerThinkingThinking statefg=#1e222a bg=#c678dd
AvanteStateSpinnerCompactingCompacting statefg=#1e222a bg=#c678dd
Source: lua/avante/highlights.lua:43-49

Task Highlights

Highlight groups for task states.
GroupDescriptionDefault
AvanteTaskRunningRunning taskfg=#c678dd bg=Normal
AvanteTaskCompletedCompleted taskfg=#98c379 bg=Normal
AvanteTaskFailedFailed taskfg=#e06c75 bg=Normal
AvanteThinkingThinking indicatorfg=#c678dd bg=Normal
Source: lua/avante/highlights.lua:50-53

Logo Highlights

Gradient highlight groups for the Avante logo (14 levels).
GroupDefault Color
AvanteLogoLine1fg=#f5f5f5
AvanteLogoLine2fg=#e8e8e8
AvanteLogoLine3fg=#dbdbdb
AvanteLogoLine4fg=#cfcfcf
AvanteLogoLine5fg=#c2c2c2
AvanteLogoLine6fg=#b5b5b5
AvanteLogoLine7fg=#a8a8a8
AvanteLogoLine8fg=#9b9b9b
AvanteLogoLine9fg=#8e8e8e
AvanteLogoLine10fg=#818181
AvanteLogoLine11fg=#747474
AvanteLogoLine12fg=#676767
AvanteLogoLine13fg=#5a5a5a
AvanteLogoLine14fg=#4d4d4d
Source: lua/avante/highlights.lua:54-68

Additional Highlights

GroupDescriptionDefault
AvanteCommentFgComment foregroundfg=Comment.fg
AvanteReversedNormalReversed normal colorsfg=Normal.bg bg=Normal.fg
Source: lua/avante/highlights.lua:41-42

Auto-Setup Behavior

By default, Avante automatically sets highlight groups if they haven’t been customized:
behaviour = {
  auto_set_highlight_group = true, -- default
}
If you’ve already customized a highlight group before Avante loads, your customization will be preserved. Source: lua/avante/highlights.lua:88-122

Customization Examples

Example 1: Custom Conflict Colors

-- Set before loading avante
vim.api.nvim_set_hl(0, 'AvanteConflictCurrent', {
  bg = '#4a2c2e',
  bold = true,
})

vim.api.nvim_set_hl(0, 'AvanteConflictIncoming', {
  bg = '#2c3d3d',
  bold = true,
})

Example 2: Using Existing Highlight Groups

require('avante').setup({
  highlights = {
    diff = {
      current = "DiffText",
      incoming = "DiffAdd",
    },
  },
})

Example 3: Custom Titles

vim.api.nvim_set_hl(0, 'AvanteTitle', {
  fg = '#ffffff',
  bg = '#5c6370',
  bold = true,
})

vim.api.nvim_set_hl(0, 'AvanteSubtitle', {
  fg = '#ffffff',
  bg = '#61afef',
})

Example 4: Disable Auto-Setup

require('avante').setup({
  behaviour = {
    auto_set_highlight_group = false,
  },
})

-- Then manually set all highlights
vim.api.nvim_set_hl(0, 'AvanteTitle', { ... })
vim.api.nvim_set_hl(0, 'AvanteSubtitle', { ... })
-- etc.

Summary Table

CategoryHighlight Groups
Titles7 groups
Conflicts4 groups
UI Elements6 groups
Buttons6 groups
Input2 groups
Sidebar3 groups
Spinners7 groups
Tasks4 groups
Logo14 groups
Other2 groups
Total55 groups

Build docs developers (and LLMs) love