Skip to main content

Overview

Avante.nvim provides AI-powered code assistance that integrates seamlessly into your Neovim workflow. Ask questions about your code, get intelligent suggestions, and apply AI-generated changes with a single command.

Core Features

Ask Questions

Get intelligent answers about your code, architecture, or implementation details

Code Editing

AI suggests and applies targeted code improvements and refactoring

Chat Sessions

Maintain context across multiple interactions with persistent chat history

Visual Mode Editing

Select code visually and ask AI to refactor, improve, or explain it

Asking Questions

Ask the AI questions about your current code file:

From Command Mode

The AI will analyze your code and provide specific suggestions.

With Keybindings

Press <Leader>aa (default) to open the sidebar and start asking:
  1. Sidebar opens on the right
  2. Type your question in the input area
  3. Press <CR> to submit
  4. AI responds with analysis and suggestions

Positioning the Sidebar

Control where the sidebar appears:

Editing Code

Let AI refactor and improve your code:

Visual Selection

1

Select code in visual mode

2

Trigger AvanteEdit

Or use the keybinding: <Leader>ae (default)
3

Review suggestions

The AI generates improved code. Review the diff in the sidebar.
4

Apply changes

  • Press a to apply at cursor
  • Press A to apply all suggestions
  • Press co / ct to choose ours/theirs in conflicts

Example Editing Workflow

Select the function and run:
AI suggests:

Chat Sessions

Maintain context across multiple interactions:

Starting a Chat

This opens the sidebar without immediately asking a question (as opposed to :AvanteAsk which prompts immediately).

Creating New Chats

Start a fresh conversation with no previous context.

Managing History

Avante automatically saves your chat history:
Or use keybindings:
  • <Leader>ah - Select from history
  • <Leader>an - New chat session

Adding Context

Help the AI understand your project better:

Adding Files

Add files to the conversation context:

Using Mentions

Reference specific context in your prompts:
See Completion Sources for details.

Project Instructions

Create an avante.md file in your project root:
The AI will reference this file automatically.

One-Click Application

Quickly apply AI suggestions to your code:

Apply at Cursor

Press a in the sidebar to apply the suggestion under your cursor.

Apply All

Press A to apply all AI-suggested changes at once.

Diff Navigation

Navigate and resolve conflicts: Move between sidebar and code:

Configuration

Customize AI assistance behavior:

Tips for Better Results

Be specific: Instead of “improve this”, say “refactor this to reduce cyclomatic complexity and improve readability”.
Provide context: Use @mentions to reference related files and @diagnostics to include error information.
Iterate: Don’t expect perfection on the first try. Use the edit feature (e) to refine your request.
Review before applying: Always review AI suggestions before applying, especially for critical code.

Next Steps

Quick Start

Get started with Avante in minutes

Completion Sources

Use mentions, slash commands, and shortcuts

Diff Management

Master conflict resolution

Project Instructions

Guide AI with project context