Avante.nvim - paulopatto/dotfiles GitHub Wiki

About Avante.nvim

avante.nvim is a Neovim plugin designed to emulate the behaviour of the Cursor AI IDE. It provides users with AI-driven code suggestions and the ability to apply these recommendations directly to their source files with minimal effort.

With this the #28 become outdated

Key Bindings

The following key bindings are available for use with avante.nvim:

Key Binding Description
Leaderaa show sidebar
Leaderar refresh sidebar
Leaderaf switch sidebar focus
Leaderae edit selected blocks
co choose ours
ct choose theirs
ca choose all theirs
c0 choose none
cb choose both
cc choose cursor
]x move to previous conflict
[x move to next conflict
[[ jump to previous codeblocks (results window)
]] jump to next codeblocks (results windows)

Note

If you are using lazy.nvim, then all keymap here will be safely set, meaning if <leader>aa is already binded, then avante.nvim won't bind this mapping. In this case, user will be responsible for setting up their own. See notes on keymaps for more details.

Commands

Command Description Examples
:AvanteAsk [question] [position] Ask AI about your code. Optional position set window position and ask enable/disable direct asking mode :AvanteAsk position=right Refactor this code here
:AvanteBuild Build dependencies for the project
:AvanteChat Start a chat session with AI about your codebase. Default is ask=false
:AvanteEdit Edit the selected code blocks
:AvanteFocus Switch focus to/from the sidebar
:AvanteRefresh Refresh all Avante windows
:AvanteSwitchProvider Switch AI provider (e.g. openai)
:AvanteShowRepoMap Show repo map for project's structure
:AvanteToggle Toggle the Avante sidebar

Highlight Groups

Highlight Group Description Notes
AvanteTitle Title
AvanteReversedTitle Used for rounded border
AvanteSubtitle Selected code title
AvanteReversedSubtitle Used for rounded border
AvanteThirdTitle Prompt title
AvanteReversedThirdTitle Used for rounded border
AvanteConflictCurrent Current conflict highlight Default to Config.highlights.diff.current
AvanteConflictIncoming Incoming conflict highlight Default to Config.highlights.diff.incoming
AvanteConflictCurrentLabel Current conflict label highlight Default to shade of AvanteConflictCurrent
AvanteConflictIncomingLabel Incoming conflict label highlight Default to shade of AvanteConflictIncoming
AvantePopupHint Usage hints in popup menus
AvanteInlineHint The end-of-line hint displayed in visual mode

See highlights.lua for more information

⚠️ **GitHub.com Fallback** ⚠️