Skip to content

Welcome to CodeCompanion.nvim

AI-powered coding, seamlessly in Neovim

CodeCompanion is a productivity tool which streamlines how you develop with LLMs, in Neovim.

Features

  • 💬 Copilot Chat meets Zed AI, in Neovim
  • 🔌 Support for Anthropic, Copilot, GitHub Models, DeepSeek, Gemini, Mistral AI, Novita, Ollama, OpenAI, Azure OpenAI, HuggingFace and xAI LLMs out of the box (or bring your own!)
  • 🫶 User contributed and supported adapters
  • 🚀 Inline transformations, code creation and refactoring
  • 🤖 Variables, Slash Commands, Agents/Tools and Workflows to improve LLM output
  • ✨ Built in prompt library for common tasks like advice on LSP errors and code explanations
  • 🏗️ Create your own custom prompts, Variables and Slash Commands
  • 📚 Have multiple chats open at the same time
  • 💪 Async execution for fast performance

Plugin Overview

The plugin uses adapters to connect to LLMs. Out of the box, the plugin supports:

  • Anthropic (anthropic) - Requires an API key and supports prompt caching
  • Copilot (copilot) - Requires a token which is created via :Copilot setup in Copilot.vim
  • GitHub Models (githubmodels) - Requires gh to be installed and logged in
  • DeepSeek (deepseek) - Requires an API key
  • Gemini (gemini) - Requires an API key
  • HuggingFace (huggingface) - Requires an API key
  • Mistral AI (mistral) - Requires an API key
  • Novita (novita) - Requires an API key
  • Ollama (ollama) - Both local and remotely hosted
  • OpenAI (openai) - Requires an API key
  • Azure OpenAI (azure_openai) - Requires an Azure OpenAI service with a model deployment
  • xAI (xai) - Requires an API key

The plugin utilises objects called strategies. These are the different ways that a user can interact with the plugin. The chat strategy harnesses a buffer to allow direct conversation with the LLM. The inline strategy allows for output from the LLM to be written directly into a pre-existing Neovim buffer.

The plugin allows you to specify adapters for each strategy and also for each prompt library entry.

Released under the MIT License.