Neovim users don't have to switch to VS Code or Cursor to get an AI coding assistant. A handful of well-maintained plugins bring chat, in-place code edits and Copilot-style completion into the editor, and the best of them can talk to a model running on your own PC through Ollama or llama.cpp, so your code never leaves the machine.
One thing to know before you start: none of these plugins makes a local model clever. The quality of the answers, and how fast they arrive, depends on the model you run and the graphics card it runs on. Our guides to how much VRAM you need and the best GPU for local LLMs cover that side.
At a glance
Plugin | Best for | Local model support | What it does |
|---|
CodeCompanion.nvim | Most people | Built-in ollama adapter; llama.cpp, LM Studio and vLLM via openai_compatible | Chat buffer, inline edits with diff review, tools and agents |
avante.nvim | A Cursor-style sidebar | ollama and llama-cpp among its providers
| Sidebar chat that applies suggested changes to your files |
minuet-ai.nvim | Copilot-style autocomplete | Ollama and llama.cpp via OpenAI-compatible FIM endpoints | Code completion as you type |
gen.nvim | The simplest setup | Ollama only | Run prompts on a selection and replace it with the result |
1. CodeCompanion.nvim - best Neovim AI plugin for most people
CodeCompanion describes itself as "Copilot Chat meets Zed AI, in Neovim", and it's the most complete option here for local models. It ships with an ollama adapter, and its documentation includes a dedicated guide to running local models, which is a good sign that local use is a first-class path rather than an afterthought. Other local servers that speak the OpenAI API, such as llama.cpp, LM Studio and vLLM, connect through its openai_compatible adapter.
You get a chat buffer (:CodeCompanionChat) where you can pull in editor context such as #{buffer}, #{diagnostics} for LSP errors or #{selection}, plus an inline mode (:CodeCompanion) that edits the current buffer and shows the changes as a diff you accept or reject a hunk at a time. Tools such as @{files} let the model read and edit files, with some tools asking for your approval before they run, and there's a prompt library with ready-made /explain, /fix, /lsp and /commit prompts. It also supports MCP through the mcphub.nvim extension and can drive agents such as Claude Code and Codex over the Agent Client Protocol, though those are cloud services rather than local models.
Things to know: it needs Neovim 0.12 or later plus curl and plenary.nvim, and the developer recommends pinning it to a release because of breaking changes. Its default adapter is GitHub Copilot, so you must set the Ollama adapter and a model yourself. Its docs warn that tools and inline edits only work with models that support tool calling, and suggest a model of around 20B parameters or more as a sensible starting point for its agent mode, because smaller models often call the wrong tool. It's licensed under Apache 2.0.
2. avante.nvim - best for a Cursor-style workflow
avante.nvim is designed to emulate the behaviour of the Cursor AI IDE: you open a sidebar (<Leader>aa by default), ask about the current file, and apply the AI's suggested changes to your source with a single command. Its providers include ollama and llama-cpp, its default Ollama endpoint is http://127.0.0.1:11434, and it defaults to an "agentic" mode that uses tools to generate and apply code, with a "legacy" planning mode if you'd rather it didn't run tools automatically.
It reads project instructions from an avante.md file in your project root and can also read files such as AGENTS.md and CLAUDE.md. There's optional MCP support through mcphub.nvim, ACP support for external agents, a "Zen mode" that turns Neovim into an agent-style terminal app, and an optional RAG service that isn't enabled by default and needs extra setup.
Things to know: avante is Lua plus Rust libraries, so installing it involves a build step (make, a PowerShell script on Windows, or :AvanteBuild to fetch prebuilt binaries). Its README badge lists Neovim 0.12+, while an older note in the same README says 0.11 or later, so a current 0.12 release is the safe choice. Its default provider is Claude, a cloud service, so you need to point it at Ollama yourself. Its automatic suggestions are marked as experimental. It's licensed under Apache 2.0.
3. minuet-ai.nvim - best for local autocomplete
Chat plugins don't give you ghost-text suggestions as you type; minuet-ai.nvim does. It provides AI code completion using either fill-in-the-middle (FIM) prompts for models that support them (the README names DeepSeek, Codestral and Qwen), or specialised prompts for ordinary chat models. It works with Ollama and llama.cpp as well as cloud providers, and can show suggestions as virtual text, through nvim-cmp, blink.cmp or mini.completion, or as an opt-in in-process LSP server for Neovim's built-in completion. The README stresses that it runs no proprietary binary in the background, just curl and your chosen model server, and it has an experimental next-edit prediction feature called Duet.
Things to know: it needs Neovim 0.10 or later (0.11 for built-in completion). Its Ollama example uses qwen2.5-coder:7b through the openai_fim_compatible provider at http://localhost:11434/v1/completions, and the developer recommends starting with a small 512-token context window and one completion at a time on local hardware, then increasing the window as your PC allows. The README's own guidance is that, ideally, latency should be under a second for completion to feel responsive, so a fast GPU matters more here than for chat. It's licensed under GPL-3.0.
4. gen.nvim - simplest way to use Ollama in Neovim
gen.nvim is the lightweight choice. It needs only Ollama and curl, and its job is simple: run a prompt (from its built-in menu or your own) over the current selection or buffer, show the result in a float or split, and optionally replace the selection with it. :Gen Chat gives you a basic chat, and you can switch models from inside Neovim.
Things to know: it's Ollama-only, has no tools, agents or diff review, and the default model in its example config is mistral, so change it to something you've pulled. Its GitHub repository showed no new commits since May 2025 when we checked, so treat it as a simple, stable tool rather than one that's tracking new Neovim features. It's released under the Unlicense.
How to choose
You want one plugin that does chat and edits well with Ollama: CodeCompanion.nvim. Our step-by-step CodeCompanion and Ollama guide walks through setup.
You like Cursor's sidebar-and-apply approach: avante.nvim. See CodeCompanion vs avante.nvim for the trade-offs.
You mainly want suggestions as you type: minuet-ai.nvim, alongside either of the above.
You just want to send a selection to a local model: gen.nvim.
Whichever you pick, the Ollama side is the same: set a larger context length for bigger files, keep the model loaded so the first request isn't slow, and check it's using your GPU. If you'd rather work outside Neovim, our best local AI coding assistants round-up covers VS Code extensions and terminal tools such as Aider.