CopilotChat.nvim: GitHub Copilot Chat inside Neovim
Chat with GitHub Copilot in Neovim
At a glance
- What is it?
- CopilotChat.nvim puts GitHub Copilot Chat in a Neovim buffer, with resources, tools, sticky prompts and a Lua API. Here is what it does, how to set it up, and where it stops being the right tool.
- Who is it for?
- Adopt CopilotChat.nvim if you already live in Neovim, have Copilot chat enabled in your GitHub settings, and want prompts, file context and tool calls scriptable from Lua. Skip it if you want a chat client that works without a GitHub account, or if you need an editor-agnostic interface.
- Can I use it commercially?
- Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 32 days ago.
- What is it written in?
- Mainly Lua, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What CopilotChat.nvim solves for Neovim users
GitHub Copilot Chat normally lives in an IDE panel. If your editing happens in Neovim, you either keep a second editor open for chat or you copy code back and forth. CopilotChat.nvim closes that gap by rendering the chat in a Neovim buffer and wiring it to the same Copilot backend, so the code you are looking at is the code the model can see.
The README frames the project around transparency and user control. That shows up in the design: the plugin states that it only shares what you explicitly request, with no background data collection. Context is added deliberately through resources rather than by shipping your whole buffer to the API. For engineers who are uneasy about an assistant that reads files on its own, that default matters more than any feature list.
The intended user is a Neovim user who already has Copilot access and wants chat, diffs and scripted prompts without leaving the terminal.
Resources, tools and sticky prompts: the actual mechanism
The README describes five sigil-based concepts that drive everything. Resources are written as `#<name>` and pull specific content such as files, git diffs or URLs into the prompt. Tools are `@<name>` and expose workspace functions the model can call, including file reading, git operations and search. Sticky prompts, written `> <text>`, persist context across a single chat session. A model is selected with `$<model>`. Prompt templates are invoked with `/PromptName`.
Tool calling is the part with real consequences. The README says tools run with manual approval by default, and that automatic execution is available for trusted tools. That is a sensible split: a search or file-read call is cheap to approve, while anything that touches git deserves a look before it runs. The README does not spell out what makes a tool trusted, so treat that setting as something to configure deliberately rather than enable globally.
Context handling has a second layer. The plugin replaces resources to avoid duplicating the same content in a conversation, and counts history tokens with tiktoken when the optional tiktoken_core library is present. Token counting is optional, which means long sessions without it can drift toward the model's context limit with less warning.
Completion is the discovery path. Pressing Tab after `#` or `@` lists what is available, and the README calls this the easiest way to see your options. The same README warns that on Neovim below 0.11.0 you must add `noinsert` or `noselect` to `completeopt`, otherwise chat autocompletion will not work at all.
Installing CopilotChat.nvim and running a first chat
The requirements section is short and worth reading before anything else: Neovim 0.10.0 or newer, curl 8.0.0 or newer, Copilot chat in the IDE enabled in your GitHub settings, and plenary.nvim. Optional dependencies are tiktoken_core for accurate token counting, git for diff context, ripgrep for faster search, and lynx for URL context.
With lazy.nvim, the README gives this spec. The `build` step runs `make tiktoken`, which downloads the tiktoken_core binary for your platform from the lua-tiktoken releases.
return {
{
"CopilotC-Nvim/CopilotChat.nvim",
dependencies = {
{ "nvim-lua/plenary.nvim", branch = "master" },
},
build = "make tiktoken",
opts = {
-- See Configuration section for options
},
},
}After the plugin loads, open the chat and ask something. `:CopilotChat` opens it with optional input, and `:CopilotChatOpen`, `:CopilotChatClose` and `:CopilotChatToggle` manage the window. Inside the chat buffer, Tab completes resources and options.
:CopilotChatOpen
:CopilotChat What does this file do?You should see a chat buffer with the model's reply streaming in. To pull a file into the prompt, type `#` and press Tab to pick from the list. To stop a long response, `:CopilotChatStop` halts the current output, and `:CopilotChatReset` clears the window. History can be saved and restored with `:CopilotChatSave <name>` and `:CopilotChatLoad <name>`.
If you use a picker, the README notes that the default `vim.ui.select` is very basic and should be replaced. For fzf-lua that means calling `require('fzf-lua').register_ui_select()`; telescope users set up telescope-ui-select.nvim; snacks.picker users enable the `ui_select` config; mini.pick users assign `vim.ui.select = require('mini.pick').ui_select`.
Where CopilotChat.nvim gets in the way
The dependency on a GitHub account with Copilot chat enabled is the first hard boundary. The README lists it under requirements, not as an optional extra. If your organisation has not enabled Copilot chat in the IDE, the plugin has nothing to talk to.
The second boundary is the version floor. Neovim 0.10.0 and curl 8.0.0 are both required, and the autocompletion caveat for Neovim below 0.11.0 is easy to miss because the symptom is silence rather than an error. A chat buffer where Tab does nothing looks like a broken plugin, not a `completeopt` setting.
Token counting is another soft spot. It depends on tiktoken_core, which the build step downloads as a platform-specific binary. The Makefile supports Linux, macOS and Windows (including MSYS), and errors out on anything else. On an unsupported platform the build target fails rather than falling back, so you either skip tiktoken or build the library yourself.
The README does not document what happens when a tool call is rejected mid-conversation, nor how a partially approved tool sequence is represented in history. Given that tool execution is the most consequential feature here, that is a gap worth knowing about before you hand the model git operations.
CopilotChat.nvim vs codecompanion and other Neovim chat plugins
The natural comparison is codecompanion, another Neovim chat plugin. The difference is where the model comes from. CopilotChat.nvim is built around the GitHub Copilot backend, and the README lists GPT-4o, Gemini 2.5 Pro, Claude 4 Sonnet, Claude 3.7 Sonnet, Claude 3.5 Sonnet, o3-mini and o4-mini as available through it, with the exact list depending on your GitHub Copilot settings and GitHub's API. Custom providers such as Ollama and Mistral.ai are supported as an extension path.
A plugin that talks to multiple providers directly inverts that: you bring your own key or local model and the plugin does not assume Copilot. That is the right shape if you want a local Ollama model as the default or if your team does not use Copilot at all. CopilotChat.nvim's advantage is the opposite: if Copilot is already provisioned for you, there is no key management to do, and the model list follows your GitHub settings.
The second difference is scripting. The README describes a comprehensive Lua API for automation and headless mode operation, plus custom functions and providers as extension points, with mcphub.nvim named as an integration. If you want chat driven from a script or a CI-style headless run, that API surface is the reason to pick this plugin over a purely interactive one.
Maintenance, licence and upgrade cost
The repository is not archived, and the last push was on 2026-08-30. Releases are frequent and versioned: v4.7.2 on 2025-09-17, v4.7.3 on 2025-09-28, v4.7.4 on 2025-10-01. The project also carries a CHANGELOG.md and a MIGRATION.md at the repository root, which is the signal that matters for upgrades. A migration file means some versions change configuration in ways that need edits, so pinning a version and reading MIGRATION.md before jumping is cheaper than discovering a renamed option at runtime.
The licence is GPL-3.0. For a Neovim plugin that you load into your own editor, that is normally unremarkable. It becomes relevant if you intend to copy plugin code into a differently licensed project or redistribute a modified version, since GPL-3.0 carries copyleft obligations. That is a description of the licence, not legal advice; check with whoever handles licensing where you work.
Upgrade cost is mostly the build step. The `make tiktoken` target re-downloads a platform-specific binary, so upgrades on an unusual architecture can fail at build time rather than at runtime. The Makefile's OS detection covers Linux, Darwin and Windows_NT including MSYS_NT, and raises an error otherwise.
Editorial conclusion
Adopt CopilotChat.nvim if you already live in Neovim, have Copilot chat enabled in your GitHub settings, and want prompts, file context and tool calls scriptable from Lua. Skip it if you want a chat client that works without a GitHub account, or if you need an editor-agnostic interface. Before trusting it with a repository, confirm that Copilot chat in the IDE is enabled on your account, that your Neovim is at least 0.10.0 with curl 8.0.0 or newer available, and that your completeopt contains noinsert or noselect on Neovim versions below 0.11.0, since autocompletion in the chat buffer silently depends on it.
Frequently asked questions
How do I use Copilot chat in Neovim with CopilotChat.nvim?
Install the plugin with plenary.nvim as a dependency, then run :CopilotChat or :CopilotChatOpen to open the chat buffer. Add context by typing # and pressing Tab to pick a resource, and use /PromptName for predefined prompt templates.
Why does CopilotChat.nvim show a model as not found?
The README states that the exact list of available models depends on your GitHub Copilot settings and the models provided by GitHub's API. Check the Copilot features page in your GitHub settings, and use :CopilotChatModels to see what your account currently exposes.
What are the requirements for installing CopilotChat.nvim?
The README lists Neovim 0.10.0 or newer, curl 8.0.0 or newer, Copilot chat in the IDE enabled in your GitHub settings, and plenary.nvim. Optional dependencies are tiktoken_core, git, ripgrep and lynx.
Does CopilotChat.nvim support agent mode and tool calling?
Yes. Tools are invoked with @<name> and let the model call workspace functions such as file reading, git operations and search. The README says tools run with manual approval by default, with automatic execution available for trusted tools.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/copilotc-nvim-copilotchat-nvim)