Setup Function
Avante.nvim is configured through thesetup() function, which should be called in your Neovim configuration:
When to Call Setup
When loading the plugin synchronously, we recommend calling
require('avante').setup() sometime after your colorscheme to ensure proper highlight groups are applied.Configuration Structure
The configuration is organized into several main sections:- Provider Settings - Configure AI providers (Claude, OpenAI, Gemini, etc.)
- Behavior Settings - Control plugin behavior (auto-suggestions, keymaps, diff handling)
- Window Settings - Customize window appearance and layout
- Mappings - Define keybindings for all plugin actions
- Advanced Features - RAG service, web search, custom tools, etc.
Minimal Configuration
Here’s a minimal configuration to get started with Claude:Full Configuration Example
Here’s a more complete configuration showing commonly used options:Configuration Modes
Avante.nvim supports two interaction modes:The interaction mode:
agentic- AI uses tools to automatically generate and apply code changeslegacy- Traditional planning method without automatic tool execution
Environment Variables
Scoped API Keys (Recommended)
Avante supports scoped API keys that are isolated specifically for Avante:Global API Keys (Legacy)
You can still use traditional global API keys:Overriding Configuration
You can dynamically override configuration at runtime using theoverride() function:
Configuration Files Location
Avante stores some configuration data in:- Config file:
~/.config/avante.nvim/config.json(last used model/provider) - History storage:
vim.fn.stdpath("state") .. "/avante"(chat history) - Prompt logs:
vim.fn.stdpath("cache")(prompt logger)
Next Steps
Provider Configuration
Learn how to configure different AI providers
Keybindings
Customize keyboard shortcuts
Window Settings
Configure window appearance and layout
Behavior Settings
Control plugin behavior and features