About GitHub Copilot and Neovim
GitHub Copilot provides autocomplete-style suggestions from an AI pair programmer as you code. For more information, see "About GitHub Copilot for Individuals".
If you use Neovim, you can view and incorporate suggestions from GitHub Copilot directly within the editor.
Prerequisites
-
To use GitHub Copilot you must have an active GitHub Copilot subscription. For more information, see "About billing for GitHub Copilot."
-
To use GitHub Copilot in Neovim you must have Neovim version 0.6 or above and Node.js version 17 or below installed. For more information, see the Neovim documentation and the Node.js website.
Installing the Neovim extension
-
GitHub recommends that you install the GitHub Copilot plugin with Neovim's built-in plugin manager. Alternatively, you can use a plugin manager of your choice to install
github/copilot.vim
.-
To install GitHub Copilot with Neovim's built-in plugin manager, enter the following command in Terminal.
git clone https://github.com/github/copilot.vim \ ~/.config/nvim/pack/github/start/copilot.vim
-
-
To configure GitHub Copilot, open Neovim and enter the following command.
:Copilot setup
-
Enable GitHub Copilot in your Neovim configuration, or with the Neovim command.
:Copilot enable
-
GitHub recommends that you install the GitHub Copilot plugin with Neovim's built-in plugin manager. Alternatively, you can use a plugin manager of your choice to install
github/copilot.vim
.-
To install GitHub Copilot with Neovim's built-in plugin manager, enter the following command in Git Bash.
git clone https://github.com/github/copilot.vim.git \ $HOME/AppData/Local/nvim/pack/github/start/copilot.vim
-
-
To configure GitHub Copilot, open Neovim and enter the following command.
:Copilot setup
-
Enable GitHub Copilot in your Neovim configuration, or with the Neovim command.
:Copilot enable
-
GitHub recommends that you install the GitHub Copilot plugin with Neovim's built-in plugin manager. Alternatively, you can use a plugin manager of your choice to install
github/copilot.vim
.-
To install GitHub Copilot with Neovim's built-in plugin manager, enter the following command:
git clone https://github.com/github/copilot.vim \ ~/.config/nvim/pack/github/start/copilot.vim
-
-
To configure GitHub Copilot, open Neovim and enter the following command.
:Copilot setup
-
Enable GitHub Copilot in your Neovim configuration, or with the Neovim command.
:Copilot enable
Learning to use GitHub Copilot in Neovim
For guidance on using GitHub Copilot in Neovim, you can view the plugin documentation. To see the documentation, open Neovim and run the following command.
:help copilot