Overview
Avante.nvim provides auto-suggestions (also known as inline completions) that give you AI-powered code suggestions as you type, similar to GitHub Copilot. This feature is currently in experimental stage.Enabling Auto-Suggestions
Auto-suggestions are disabled by default. Enable them in your configuration:Provider Selection
Recommended providers for auto-suggestions:"claude"- Claude models (recommended)"openai"- OpenAI models"gemini"- Google Gemini
"copilot" unless you understand the implications.
Configuration
Debounce and Throttle Settings
To control the frequency of suggestion requests, configure debounce and throttle:Time in milliseconds to wait after typing stops before requesting a suggestion
Minimum time in milliseconds between suggestion requests
Keybindings
Default keybindings for working with suggestions:| Key Binding | Mode | Description |
|---|---|---|
<M-l> | Insert | Accept current suggestion |
<M-]> | Insert | Show next suggestion |
<M-[> | Insert | Show previous suggestion |
<C-]> | Insert | Dismiss current suggestion |
<M-l> means Alt+l on Linux/Windows or Option+l on macOS.Customizing Keybindings
You can customize the suggestion keybindings in your configuration:Custom Keybinding Example
Toggle Suggestions
You can toggle the suggestion display on and off:Provider Configuration
Configure your auto-suggestions provider with appropriate settings:How Auto-Suggestions Work
Context Gathering
When the debounce period expires, Avante gathers context from:
- Current file content
- Cursor position
- Recent changes
- Project context (if RAG is enabled)
Request Generation
A suggestion request is sent to the configured provider (respecting throttle limits).
Best Practices
Choose the Right Provider
Use providers with good latency and reasonable pricing for auto-suggestions. Claude is generally recommended.
Adjust Timing
Fine-tune
debounce and throttle to balance responsiveness with API costs.Monitor Usage
Keep an eye on your API usage, especially during heavy coding sessions.
Use with RAG
Enable the RAG service for better context-aware suggestions.
Troubleshooting
Suggestions are too slow
Suggestions are too slow
- Reduce
debouncevalue (but this increases API calls) - Use a faster provider (e.g., Claude Haiku instead of Sonnet)
- Check your internet connection
- Ensure your provider endpoint is responsive
Too many API calls
Too many API calls
- Increase
debouncevalue (e.g., to 1000ms) - Increase
throttlevalue - Consider disabling auto-suggestions for certain file types
Suggestions aren't appearing
Suggestions aren't appearing
- Verify
behaviour.auto_suggestions = true - Check that your provider is configured correctly
- Ensure API keys are set
- Look for errors in
:messages
Suggestions are low quality
Suggestions are low quality
- Enable the RAG service for better context
- Adjust provider temperature (lower for more focused)
- Ensure you’re using a capable model
- Add project instructions via
avante.md
Disabling Auto-Suggestions
If you want to disable auto-suggestions:<Leader>as or :AvanteToggleSuggestion.
Related Documentation
Providers
Configure AI providers
Keybindings
Customize all keybindings
RAG Service
Enable RAG for better suggestions
Project Instructions
Guide AI with project-specific context