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".
If you use a Neovim, you can view and incorporate suggestions from GitHub Copilot directly within the editor.
Prerequisites
To use GitHub Copilot in Neovim you must have Neovim and Node.js version 17 or below installed. For more information, see the Neovim documentation and the Node.js website.
Installing the Neovim extension
-
To use GitHub Copilot in Neovim, install the GitHub Copilot plugin. You can either install the plugin from a plugin manager or directly.
-
If you use a plugin manager like vim-plug or packer.nvim, use the plugin manager to install
github/copilot.vim
. For more information, see the documentation for the plugin manager. For example, you can see the documentation for vim-plug or packer.nvim. -
To install the GitHub Copilot plugin directly, you must know where Neovim stores plugins. To install the plugin, enter the following command in Terminal.
git clone https://github.com/github/copilot.vim \ PATH/TO/NEOVIM/PLUGINS/copilot.vim
-
-
To configure GitHub Copilot, open Neovim and enter the following command.
:Copilot setup
-
To use GitHub Copilot in Neovim, install the GitHub Copilot plugin. You can either install the plugin from a plugin manager or directly.
-
If you use a plugin manager like vim-plug or packer.nvim, use the plugin manager to install
github/copilot.vim
. For more information, see the documentation for the plugin manager. For example, you can see the documentation for vim-plug or packer.nvim. -
To install the GitHub Copilot plugin directly, you must know where Neovim stores plugins. To install the plugin, enter the following command in Git Bash.
git clone https://github.com/github/copilot.vim \ ~/.config/PATH/TO/YOUR/NEOVIM/CONFIG/FILE/copilot.vim
-
-
To configure GitHub Copilot, open Neovim and enter the following command.
:Copilot setup
-
To use GitHub Copilot in Neovim, install the GitHub Copilot plugin. You can either install the plugin from a plugin manager or directly.
-
If you use a plugin manager like vim-plug or packer.nvim, use the plugin manager to install
github/copilot.vim
. For more information, see the documentation for the plugin manager. For example, you can see the documentation for vim-plug or packer.nvim. -
To install the GitHub Copilot plugin directly, you must know where Neovim stores plugins. To install the plugin, enter the following command in Git Bash.
git clone https://github.com/github/copilot.vim \ ~/.config/PATH/TO/YOUR/NEOVIM/CONFIG/FILE/copilot.vim
-
-
To configure GitHub Copilot, open Neovim and enter the following command.
:Copilot setup
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