Welcome to CodeCompanion.nvim
AI Coding, Vim Style
CodeCompanion is a plugin which enables you to code with AI, using LLMs and agents, in Neovim.
Features
- 💬 Copilot Chat meets Zed AI, in Neovim
- ⚡ Integrates Neovim with LLMs and Agents in the CLI
- 🔌 Support for LLMs from Anthropic, DeepSeek, Google Gemini, GitHub Copilot, GitHub Models, Kimi, Mistral, Novita, Ollama, OpenAI, Azure OpenAI, OpenRouter, HuggingFace and xAI out of the box (or bring your own!)
- 🤖 Support for Agent Client Protocol, enabling coding with agents like Augment Code, Cagent from Docker, Claude Code, Cline CLI, Codex, Copilot CLI, Gemini CLI, Goose, Cursor CLI, Kilo Code, Kimi CLI, Kiro, Mistral Vibe and OpenCode
- 🫶 User contributed and supported adapters
- 👨💻 Code reviews enabling you to comment on and approve/reject agent code
- 🔋 Support for Model Context Protocol (MCP)
- 🚀 Inline transformations, code creation and refactoring
- 🤖 Editor Context, Slash Commands, Tools and Workflows to improve LLM output
- 🧠 Support for rules files like
CLAUDE.md,.cursor/rulesand your own custom ones - ✨ Built-in prompt library for common tasks like advice on LSP errors and code explanations
- 🏗️ Create your own custom prompts, Editor Context and Slash Commands
- 📥 Have multiple chats open at the same time
- 🎨 Support for images and PDFs as input
- 💪 Async execution for fast performance
Overview
CodeCompanion utilises objects called interactions. These are the different ways that a user can interact with an LLM. The chat interaction harnesses a buffer to allow direct conversations with LLMs. The inline interaction allows for output from the LLM to be written directly, inline to a pre-existing Neovim buffer.
CodeCompanion uses adapters to connect Neovim to an LLM or agent, even going as far as specifying models and/or hyperparameters. You can specify adapters for each interaction type and also for each prompt library entry. There are far too many adapters to list so be sure to check out the adapters folder in the main repository. You can also roll your own adapters. Refer to the extending adapters documentation for more information. Finally, be sure to check out the community adapters section for user contributed adapters.