An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        


CodeCompanion.nvim





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:


Bassam DataIvo TobyKTS CodeLuxusUser avatar: Carlos FlorêncioUser avatar: Jeff GordonUser avatar: Vít ObrusníkUser avatar: Linfeng LiUser avatar: JAWUser avatar: Bryce NealUser avatar: kohane27User avatar: Michał KiełbowiczUser avatar: Muhammad Hanif

## :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