Overview
Avante.nvim integrates with both nvim-cmp and blink.cmp to provide intelligent completions for mentions, slash commands, and shortcuts within the Avante chat interface.nvim-cmp Integration
Avante works with nvim-cmp out of the box. Simply ensure nvim-cmp is installed as a dependency:blink.cmp Integration
For users of blink.cmp (a faster nvim-cmp alternative), Avante provides compatibility throughblink.compat.
LazyVim Users
If you’re using LazyVim, copy the full blink.cmp config from the website or extend the options:Manual Configuration
For other setups, add custom providers:Alternative: blink-cmp-avante
You can also use the dedicated Kaiser-Yang/blink-cmp-avante plugin.Completion Sources
Mentions (@ trigger)
Mentions allow you to quickly reference features or add context to your chat:
Enable project context and repository mapping via RAG serviceUsage: Ask questions about your entire codebaseExample:
@codebase How does authentication work in this project?Requires: RAG service to be enabledEnable diagnostics information from LSPUsage: Include current errors/warnings in the contextExample:
@diagnostics Help me fix these type errorsOpen file selector to add files to chat contextUsage: Add specific files for the AI to referenceExample:
@file (then select files from the picker)Add files from quickfix list to chat contextUsage: Include files with errors or search resultsExample:
@quickfix Review these failing testsAdd all open buffers to chat contextUsage: Give the AI context about all currently open filesExample:
@buffers Refactor these related componentsSlash Commands (/ trigger)
Built-in commands for common operations:
Show help message with available commandsUsage: Get information about Avante features and commands
Initialize AGENTS.md based on current projectUsage: Set up project-specific AI instructions
Clear chat history for the current sessionUsage: Start fresh without previous context
Start a new chat sessionUsage: Begin a separate conversation thread
Compact history messages to save tokensUsage: Reduce context size while preserving important information
Ask about specific line rangesSyntax:
/lines <start>-<end> <question>Example: /lines 10-50 What does this function do?Generate commit message for staged changesUsage: Create conventional commit messages automatically
Shortcuts (# trigger)
Shortcuts provide quick access to predefined prompt templates:
Using Shortcuts
Type# in the chat input to see available shortcuts:
#refactor→ Expands to the refactor prompt#test→ Expands to the test generation prompt#explain→ Expands to the explanation prompt
Custom Shortcuts
Create project-specific shortcuts:File Selector Configuration
Configure which file picker to use with@file:
Available Selectors
- Telescope
- fzf-lua
- mini.pick
- snacks
- Native
nvim-telescope/telescope.nvimCustom Selector Provider
Create a custom file selector:Switching Selector Provider
You can switch the selector provider at runtime:native, telescope, fzf_lua, mini_pick, snacks
Exclude Auto-Select
Prevent certain buffer types from being auto-selected:Complete Example
Here’s a complete configuration with all completion sources:Tips and Tricks
Quick File Adding
Use
@file to quickly add specific files to context without leaving the chat.Codebase Queries
Enable RAG and use
@codebase for intelligent whole-project queries.Custom Shortcuts
Create shortcuts for common project-specific prompts to save typing.
Diagnostics Context
Use
@diagnostics when asking the AI to fix errors or warnings.Related Documentation
RAG Service
Enable semantic codebase search
Slash Commands
Complete slash command reference
blink.cmp Guide
Detailed blink.cmp setup