CopilotChat.nvim is a Neovim plugin that brings GitHub Copilot Chat capabilities directly into the editor.
The plugin solves the problem of accessing AI-powered code assistance without leaving Neovim by integrating GitHub Copilot Chat into the editor's interface. It works by connecting to GitHub's Copilot API to support multiple AI models including GPT-4o, Gemini, and Claude variants, alongside custom providers like Ollama and Mistral.ai. The tool includes a tool-calling system that allows the language model to execute workspace functions such as file reading and git operations, with options for manual approval or automatic execution for trusted tools. Token efficiency is managed through resource replacement to prevent duplicate context and history management via token counting.
Developers should choose this plugin if they want to interact with GitHub Copilot Chat without switching away from Neovim. It suits projects where developers value privacy and transparency, as the plugin explicitly shares only what users request with no background data collection. The interactive chat interface includes completion, diffs, and quickfix integration, while composable templates and sticky prompts help maintain consistent context across conversations. The plugin offers a comprehensive Lua API for automation and headless operation, making it suitable for scripting and integration into custom workflows. Custom functions and providers can be added, and the tool integrates with other Neovim plugins.
The project maintains active engagement with users through discussion categories dedicated to custom functions and providers. Development includes regular updates to support new AI models as they become available through GitHub's API. The codebase is written in Lua and documented with a dedicated homepage providing setup and usage guidance.