CodeCompanion.nvim and avante.nvim are the two big AI coding plugins for Neovim, and both can run against a model on your own PC through Ollama. They take noticeably different approaches, though: CodeCompanion is built around a chat buffer and inline edits that feel native to Vim, while avante deliberately copies the Cursor AI IDE with a sidebar that applies changes to your files.
At a glance
| CodeCompanion.nvim | avante.nvim |
|---|
Design | Chat buffer plus inline edits, "Copilot Chat meets Zed AI" | Sidebar designed to emulate the Cursor AI IDE |
Local models | Built-in ollama adapter; llama.cpp, LM Studio, vLLM via openai_compatible | ollama and llama-cpp among its providers
|
Local setup docs | Dedicated "Running Local Models" guide | Provider settings in the README and config |
Default provider | GitHub Copilot | Claude |
Install | Pure Lua; needs curl and plenary.nvim | Lua plus Rust libraries; needs a build step or prebuilt binaries |
Neovim version | 0.12 or later | README badge says 0.12+ (an older note says 0.11+) |
Agent features | Tools such as @{files} and @{agent}, with approvals | "Agentic" mode by default, "legacy" planning mode optional |
Project instructions | Rules files such as AGENTS.md, CLAUDE.md and Cursor rules | avante.md, plus AGENTS.md, CLAUDE.md and similar
|
Extras | MCP via mcphub.nvim, ACP agents, prompt library, code review | MCP via mcphub.nvim, ACP agents, optional RAG service, Zen mode |
Licence | Apache 2.0 | Apache 2.0 |
Setting up with a local model
CodeCompanion is the easier of the two to get running against Ollama. It's pure Lua with no build step, it has an ollama adapter out of the box, and its documentation includes a guide specifically for local models that covers choosing a model, connecting to Ollama on another machine via OLLAMA_HOST, and tuning num_ctx, think and keep_alive for your hardware. The main gotcha, which its docs flag clearly, is that you must name a model explicitly; otherwise it picks one of your installed models unpredictably. Our CodeCompanion and Ollama guide walks through it.
avante.nvim needs a little more work. It combines Lua with Rust libraries, so your plugin manager has to run make (or a PowerShell build script on Windows), or you fetch prebuilt binaries with :AvanteBuild. Its default provider is Claude, a cloud service, so for local use you switch the provider to ollama and give it a model; its default Ollama endpoint is http://127.0.0.1:11434. There's no local-specific guide in the README, so expect to read its configuration file.
Winner: CodeCompanion, for a simpler install and clearer local-model documentation.
How you work with it
CodeCompanion gives you two main ways in. :CodeCompanionChat opens a chat buffer where you pull in editor context with variables such as #{buffer}, #{diagnostics} and #{selection}, and grant tools such as @{files} when you want the model to edit files. :CodeCompanion edits the current buffer or a visual selection in place, showing the result as a diff you step through and accept or reject a hunk at a time. A prompt library covers common jobs such as explaining code, fixing it, explaining LSP errors and writing commit messages. It sets no global keymaps, so it fits around an existing config.
avante.nvim feels more like Cursor. <Leader>aa opens a sidebar where you ask about the current file, and suggested changes can be applied to your code directly, with conflict-style keymaps to choose between versions. It defaults to an "agentic" mode that uses tools to generate and apply changes automatically; if you'd rather review a plan, its "legacy" mode uses the older planning method without automatic tool execution. It also has a "Zen mode" that launches Neovim as an agent-style terminal app.
Winner: it depends. CodeCompanion suits people who want AI to stay inside normal Vim buffers and motions; avante suits people who like Cursor's sidebar-and-apply flow.
Local model demands
Both plugins lean on tool calling for their agent features, which is where small local models struggle. CodeCompanion's documentation is unusually frank here: tools only work with models that report tool support in Ollama, its inline mode needs a tool-calling model because that's how it edits the buffer, and it suggests around 20B parameters or more as a sensible starting point for @{agent}. avante's agentic mode likewise relies on the model using tools well; its legacy mode is an option if your model doesn't. Either way, a GPU with enough VRAM for a mid-sized coding model makes more difference than the plugin choice. See how much VRAM you need, tool calling in Ollama and our best GPU for local LLMs.
Winner: draw, though CodeCompanion's documentation does a better job of explaining what your model needs.
Both support MCP servers through the mcphub.nvim extension and can drive external agents over the Agent Client Protocol, and both read project rules files such as AGENTS.md and CLAUDE.md. CodeCompanion adds a code-review view for an agent's changes and workflows that chain prompts. avante adds an optional RAG service that can retrieve project context, though it isn't enabled by default and needs extra setup, plus experimental automatic suggestions as you type. If autocomplete is what you're after, a dedicated plugin such as minuet-ai.nvim, covered in our best Neovim AI plugins guide, is the dedicated option.
Winner: draw.
Which should you choose?
Choose CodeCompanion.nvim if you want the most straightforward way to use Ollama in Neovim, prefer chat and inline edits that behave like normal Vim buffers, and value clear documentation for local models.
Choose avante.nvim if you're coming from Cursor and want the same sidebar-and-apply workflow, you're happy with a build step, and you'd like options such as its RAG service and Zen mode.
If you'd rather leave Neovim for a terminal agent instead, see Aider vs Cline and our best local AI coding assistants.