Skip to main content

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:
For users of blink.cmp (a faster nvim-cmp alternative), Avante provides compatibility through blink.compat.
When using blink.cmp, choose a selector other than native as it currently has known issues.

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:
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:
mention
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 enabled
mention
Enable diagnostics information from LSPUsage: Include current errors/warnings in the contextExample: @diagnostics Help me fix these type errors
mention
Open file selector to add files to chat contextUsage: Add specific files for the AI to referenceExample: @file (then select files from the picker)
mention
Add files from quickfix list to chat contextUsage: Include files with errors or search resultsExample: @quickfix Review these failing tests
mention
Add all open buffers to chat contextUsage: Give the AI context about all currently open filesExample: @buffers Refactor these related components

Slash Commands (/ trigger)

Built-in commands for common operations:
command
Show help message with available commandsUsage: Get information about Avante features and commands
command
Initialize AGENTS.md based on current projectUsage: Set up project-specific AI instructions
command
Clear chat history for the current sessionUsage: Start fresh without previous context
command
Start a new chat sessionUsage: Begin a separate conversation thread
command
Compact history messages to save tokensUsage: Reduce context size while preserving important information
command
Ask about specific line rangesSyntax: /lines <start>-<end> <question>Example: /lines 10-50 What does this function do?
command
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

Requires: nvim-telescope/telescope.nvim

Custom Selector Provider

Create a custom file selector:

Switching Selector Provider

You can switch the selector provider at runtime:
Available options: 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.

RAG Service

Enable semantic codebase search

Slash Commands

Complete slash command reference

blink.cmp Guide

Detailed blink.cmp setup