https://github.com/olimorris/codecompanion.nvim
✨ AI-powered coding, seamlessly in Neovim
https://github.com/olimorris/codecompanion.nvim
anthropic chatgpt claude copilot copilot-chat cursor deepseek deepseek-r1 gemini google-gemini gpt gpt4o llm neovim nvim nvim-plugin ollama openai plugin zed
Last synced: 2 months ago
JSON representation
✨ AI-powered coding, seamlessly in Neovim
- Host: GitHub
- URL: https://github.com/olimorris/codecompanion.nvim
- Owner: olimorris
- License: mit
- Created: 2023-12-27T17:32:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-28T18:00:44.000Z (3 months ago)
- Last Synced: 2025-04-28T18:03:10.683Z (3 months ago)
- Topics: anthropic, chatgpt, claude, copilot, copilot-chat, cursor, deepseek, deepseek-r1, gemini, google-gemini, gpt, gpt4o, llm, neovim, nvim, nvim-plugin, ollama, openai, plugin, zed
- Language: Lua
- Homepage: https://codecompanion.olimorris.dev
- Size: 3.79 MB
- Stars: 3,434
- Watchers: 22
- Forks: 192
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - olimorris/codecompanion.nvim - Copilot Chat like experience, complete with inline assistant. Supports Anthropic, Gemini, Ollama and OpenAI. (AI / (requires Neovim 0.5))
- awesome-ChatGPT-repositories - codecompanion.nvim - ✨ A Copilot Chat experience in Neovim, complete with inline assistant. Supports Anthropic, Gemini, Ollama and OpenAI LLMs (Browser-extensions)
- StarryDivineSky - olimorris/codecompanion.nvim
- awesome-AI-driven-development - codecompanion.nvim - AI-powered coding, seamlessly in Neovim. (Uncategorized / Uncategorized)
- awesome-neovim-sorted - olimorris/codecompanion.nvim - powered coding, seamlessly in Neovim | (AI)
- AiTreasureBox - olimorris/codecompanion.nvim - 07-15_4520_5](https://img.shields.io/github/stars/olimorris/codecompanion.nvim.svg)|✨ AI-powered coding, seamlessly in Neovim. Supports Anthropic, Copilot, Gemini, Ollama, OpenAI and xAI LLMs| (Repos)
- awesome-chatgpt - olimorris/codecompanion.nvim - CodeCompanion.nvim is an AI-powered coding assistant that integrates multiple large language models into Neovim, providing inline code transformations, chat capabilities, and customizable workflows to enhance developer productivity. (Addons, extensions, plug-ins for integrating LLM into third-party applications / Other user interfaces)
README
![]()
Code with any LLM via the in-built adapters, the community adapters or by building your own
New features are always announced here
## :purple_heart: Sponsors
Thank you to the following people:
## :sparkles: Features
- :speech_balloon: [Copilot Chat](https://github.com/features/copilot) meets [Zed AI](https://zed.dev/blog/zed-ai), in Neovim
- :electric_plug: Support for Anthropic, Copilot, GitHub Models, DeepSeek, Gemini, Mistral AI, Novita, Ollama, OpenAI, Azure OpenAI, HuggingFace and xAI LLMs (or [bring your own](https://codecompanion.olimorris.dev/extending/adapters.html))
- :heart_hands: User contributed and supported [adapters](https://codecompanion.olimorris.dev/configuration/adapters#community-adapters)
- :rocket: Inline transformations, code creation and refactoring
- :robot: Variables, Slash Commands, Agents/Tools and Workflows to improve LLM output
- :sparkles: Built in prompt library for common tasks like advice on LSP errors and code explanations
- :building_construction: Create your own custom prompts, Variables and Slash Commands
- :books: Have multiple chats open at the same time
- :muscle: Async execution for fast performance## :camera_flash: In Action
The Chat Buffer
Using Agents and Tools
Agentic Workflows
Inline Assistant
## :rocket: Getting Started
Please visit the [docs](https://codecompanion.olimorris.dev) for information on installation, configuration and usage.
## :toolbox: Troubleshooting
Before raising an [issue](https://github.com/olimorris/codecompanion.nvim/issues), there are a number of steps you can take to troubleshoot a problem:
**Checkhealth**
Run `:checkhealth codecompanion` and check all dependencies are installed correctly. Also take note of the log file path.
**Turn on logging**
Update your config and turn debug logging on:
```lua
require("codecompanion").setup({
opts = {
log_level = "DEBUG", -- or "TRACE"
}
})
```and inspect the log file as per the location from the checkhealth command.
**Try with a `minimal.lua` file**
A large proportion of issues which are raised in Neovim plugins are to do with a user's own config. That's why I always ask users to fill in a `minimal.lua` file when they raise an issue. We can rule out their config being an issue and it allows me to recreate the problem.
For this purpose, I have included a [minimal.lua](https://github.com/olimorris/codecompanion.nvim/blob/main/minimal.lua) file in the repository for you to test out if you're facing issues. Simply copy the file, edit it and run neovim with `nvim --clean -u minimal.lua`.
## :gift: Contributing
I am open to contributions but they will be implemented at my discretion. Feel free to open up a discussion before embarking on a PR and please read the [CONTRIBUTING.md](CONTRIBUTING.md) guide.
## :clap: Acknowledgements
- [Steven Arcangeli](https://github.com/stevearc) for his genius creation of the chat buffer and his feedback early on
- [Manoel Campos](https://github.com/manoelcampos) for the [xml2lua](https://github.com/manoelcampos/xml2lua) library that's used in the tools implementation
- [Dante.nvim](https://github.com/S1M0N38/dante.nvim) for the beautifully simple diff implementation
- [Wtf.nvim](https://github.com/piersolenski/wtf.nvim) for the LSP assistant action
- [CopilotChat.nvim](https://github.com/CopilotC-Nvim/CopilotChat.nvim) for the rendering and usability of the chat
buffer
- [Aerial.nvim](https://github.com/stevearc/aerial.nvim) for the Tree-sitter parsing which inspired the symbols Slash
Command
- [Saghen](https://github.com/Saghen) for the fantastic docs inspiration from [blink.cmp](https://github.com/Saghen/blink.cmp)
- [Catwell](https://github.com/catwell) for the [queue](https://github.com/catwell/cw-lua/blob/master/deque/deque.lua)
inspiration that I use to stack agents and tools