Open-source project
github/copilot.vim avatar
github/copilot.vim

copilot.vim: The Official GitHub Copilot Plugin for Vim and Neovim

Neovim plugin for GitHub Copilot

11,685 stars820 forksVim ScriptNOASSERTION

At a glance

What is it?
copilot.vim is the official Vim and Neovim plugin for GitHub Copilot. It displays inline code suggestions from the Copilot service as you type and accepts them with Tab. A GitHub Copilot subscription is required, and Node.js must be installed alongside the plugin.
Who is it for?
copilot.vim is the right choice for Vim and Neovim users with an active GitHub Copilot subscription who want inline code suggestions in their existing editor. The git clone installation is one command and works with the native Vim package manager.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 49 days ago.
What is it written in?
Mainly Vim Script, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What copilot.vim Provides for Vim and Neovim Users

copilot.vim is the official Vim and Neovim plugin for GitHub Copilot, maintained in the github/copilot.vim repository. The README describes GitHub Copilot as an AI pair programmer tool trained on billions of lines of public code, capable of turning natural language prompts, comments, and method names into code suggestions across dozens of programming languages.

The plugin brings that service into Vim's editing model. Suggestions appear as ghost text at the cursor position, displayed inline in the buffer. Pressing Tab accepts the full suggestion. The plugin targets developers who use Vim or Neovim as their primary editor and want Copilot's code completion without switching to VS Code or another IDE. It is not a standalone AI coding tool: every suggestion request travels to GitHub's servers, and the plugin requires an active GitHub Copilot subscription for any output.

The README distinguishes between two subscription entry points. Individual developers can sign up for GitHub Copilot Free at github.com/settings/copilot. Enterprise users request access through their organization administrator. Without one of these, the plugin produces no suggestions at all. This hard requirement separates copilot.vim from local AI completion tools that run a model on the developer's own machine.

How the Plugin Communicates with the Copilot Service

The repository's top-level directory includes a copilot-language-server/ directory, an autoload/ directory containing Vim Script autoload code, a lua/ directory for Neovim-specific Lua bindings, a plugin/ directory, and a doc/ directory for Vim documentation. The plugin runs a copilot-language-server process using Node.js as its runtime. This is why the README requires Node.js to be installed before the plugin can function.

When you type in a buffer, the plugin sends the current file type and surrounding buffer content to the language server, which forwards it to the GitHub Copilot API. The API returns one or more suggestions, and the language server passes them back to the plugin, which renders the top suggestion as inline ghost text. The round trip is asynchronous: the plugin does not block editing while waiting for a suggestion to arrive.

The plugin does not analyze your full project directory to generate suggestions by default; it uses the current buffer's content as context. The doc/ directory in the repository contains the full :help copilot documentation, which is available from within Vim after installation and covers commands for cycling through multiple suggestions, dismissing the current suggestion, and requesting a new one.

Installing copilot.vim and Completing the First Setup

The README provides four installation paths depending on editor and operating system. Before installation, Node.js must be present. On Debian and Ubuntu the README gives this example:

bash
apt install nodejs npm

For Neovim on Linux and macOS, the manual installation command is:

bash
git clone --depth=1 https://github.com/github/copilot.vim.git \
  ~/.config/nvim/pack/github/start/copilot.vim

For Vim on Linux and macOS:

bash
git clone --depth=1 https://github.com/github/copilot.vim.git \
  ~/.vim/pack/github/start/copilot.vim

Both paths use the native Vim 8+ package manager convention, placing the plugin in the pack/ directory structure. Plugin managers such as vim-plug and lazy.nvim are listed in the README as alternatives to the manual clone.

After cloning and restarting the editor, the setup command starts the GitHub authentication flow:

code
:Copilot setup

This opens a browser window where you authorize the plugin with your GitHub account. Once authorized, the plugin begins sending suggestions for the current buffer. The README also notes that Vim 9.0.0185 or newer is required; the plugin will not work on older Vim versions.

How Suggestions Appear and What the Tab Key Does

Copilot suggestions appear as ghost text in the buffer at the cursor position. This is virtual text rendered by the editor but not inserted into the file until you accept it. Pressing Tab while a suggestion is displayed accepts the entire suggestion and inserts it into the buffer as normal text. If you continue typing without pressing Tab, the suggestion disappears and a new one may arrive based on the updated context.

The :help copilot documentation, accessible from within Vim after installation, describes additional commands. You can cycle through alternative suggestions when the service returns more than one, dismiss the current suggestion without accepting it, or request a fresh suggestion for the current cursor position.

The README notes that suggestions are displayed inline and are accepted by pressing the tab key, and it directs readers to :help copilot for the full command reference. The complete command set and configuration options, including how to disable the plugin for specific file types or directories, are in the doc/ directory rather than in the README.

The Subscription Requirement and Its Practical Implications

Accessing GitHub Copilot through copilot.vim requires an active paid subscription unless you qualify for the free tier. The README lists two paths: GitHub Copilot Free at github.com/settings/copilot, which has usage limits not documented in the README itself, or enterprise access granted by an organization administrator.

This requirement has two practical implications. First, the plugin has no offline mode and no local fallback. Every suggestion requires a network request to GitHub's servers. A poor or absent internet connection means no suggestions. Second, the plugin is only as available as the GitHub Copilot service itself: service outages or rate limits from the API affect the plugin directly.

There is no configuration in copilot.vim for pointing the plugin at a self-hosted AI completion service or a local language model. The plugin is designed specifically for the GitHub Copilot service and has no abstraction layer that would allow swapping the backend.

copilot.vim vs copilot.lua: Two Plugins for the Same Service

copilot.lua is a community-maintained Neovim plugin that also connects to the GitHub Copilot service. The README for copilot.vim does not mention copilot.lua, but the two are often compared by Neovim users. The architectural difference matters: copilot.vim uses Vim Script with a Node.js language server process; copilot.lua targets Neovim exclusively and uses Neovim's built-in LSP client infrastructure.

This architecture difference has a practical consequence for completion workflow integration. Neovim users who use nvim-cmp or a similar completion framework often find copilot.lua easier to integrate because it speaks the same LSP protocol that the completion framework already consumes. copilot.vim renders ghost text through a different mechanism that requires separate keybinding configuration to work alongside an LSP-based completion framework.

For Vim users (not Neovim), copilot.vim is the only supported option since copilot.lua requires Neovim's LSP client, which is not available in Vim. For Neovim users, the choice depends on whether tighter integration with existing LSP tooling is important. copilot.vim, being the official repository, receives protocol and language server updates from GitHub directly; copilot.lua must track those changes as a community project.

Maintenance Status and Licence

The last push to the repository was on 2026-08-11. The repository has no GitHub releases. The release branch, named release, is the branch users install from with the git clone command. The README does not describe a versioning scheme or a compatibility policy for Vim Script API usage across Vim and Neovim versions.

The licence is present as LICENSE.md in the repository, but no standard SPDX identifier was recognized in the licence file. The plugin is an official GitHub product; LICENSE.md should be read directly to understand redistribution and modification terms before forking or packaging the plugin for distribution.

The doc/ directory contains the Vim documentation for the plugin in the standard Vim help format. After installation, running :helptags ~/.config/nvim/pack/github/start/copilot.vim/doc or the equivalent for your Vim configuration makes the documentation searchable through :help copilot inside the editor.

Editorial conclusion

copilot.vim is the right choice for Vim and Neovim users with an active GitHub Copilot subscription who want inline code suggestions in their existing editor. The git clone installation is one command and works with the native Vim package manager. It is the wrong choice for anyone unwilling to pay for a Copilot subscription, for Neovim users who want tighter LSP and completion framework integration (copilot.lua handles that better), or for anyone without a reliable connection to GitHub's servers. Before installing, verify that your Vim version is 9.0.0185 or newer and that Node.js is available in your PATH.

Frequently asked questions

Is there a Vim plugin for GitHub Copilot?

Yes. The official plugin is github/copilot.vim, maintained by GitHub and available at github.com/github/copilot.vim. It supports both Vim (version 9.0.0185 or newer) and Neovim. Installation is a single git clone command; after running :Copilot setup to authenticate, inline suggestions appear as you type.

How do you use GitHub Copilot in Vim?

Install copilot.vim by cloning the repository into your Vim or Neovim pack directory, then run :Copilot setup to authenticate with your GitHub account. Suggestions appear as ghost text in the buffer while you type. Press Tab to accept a suggestion. Node.js must be installed for the plugin to function.

How do you use copilot.vim after installation?

After running :Copilot setup and completing authentication, the plugin runs automatically when you edit files. Suggestions appear as inline ghost text at the cursor; Tab accepts the current suggestion. Run :help copilot inside Vim to see commands for cycling through alternative suggestions or dismissing the current one.

Official sources

  1. github/copilot.vim on GitHub
  2. Issues
  3. README
For maintainers

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.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/github-copilot-vim.svg)](https://hysenlabs.com/projects/github-copilot-vim)
Community notes

Community notes