Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

avante.nvim is a Neovim plugin designed to emulate the behaviour of the Cursor AI IDE. It provides users with AI-driven code suggestions and the ability to apply these recommendations directly to their source files with minimal effort.

Installation and Configuration via AstroNvim

  1. Enable avante.nvim in lua/community.lua .

Configure

  1. Customize configuration (e.g., LLM provider) in lua/plugins/avante.lua if needed.

Configure API Keys

There are multiple ways to provide LLM API keys to Avante. We will take Gemini as examples in discussions below.

  1. Do not configure any API key and let Avante ask for it when first used.

  2. Exporting environment variables. Taking Gemini as an example, exporting AVANTE_GEMINI_API_KEY works. To achieve in the fish shell, use the following command

set -Ux AVANTE_GEMINI_API_KEY "your_api_key_here"
  1. Configure api_key_name for each provide. api_key_name takes flexible values. It can one of the following.

gemini = {
    api_key_name = "cmd:gopass show -o google/gemini-api",
}
gemini = {
    api_key_name = {"gopass", "show", "-o", "google/gemini-api"},
}

I personally suggest taking approach 2 (exporting environment variables).

Usage

  1. If you run into errors saying “cannot make changes. modifiable is off” when using the sidebar, run :set modifiable to toggle on modifiable.

Mode

Key bindings

Description

Visual

Ae

Edit the selected block

Normal

+A+enter

Chat with Avante

Normal

+A+n

New chat

Thoughts on Avante

  1. early stage and there are still lots of issues

  2. slow response

  3. Neovim (without Avante) + Claude/Antigravity CLI is an alternative way

References