Skip to main content

Instalar a extensão do GitHub Copilot em seu ambiente

Para usar o Copilot em seu ambiente de codificação preferencial, siga as etapas referentes ao IDE escolhido.

Getting access to GitHub Copilot

There are different ways to get access to Copilot.

Type of userHow to get access to Copilot
Individual
Organization

About the GitHub Copilot extension in Vim/Neovim

Installing the GitHub Copilot extension in Vim/Neovim allows you to receive coding suggestions from Copilot as you type.

To see instructions for other popular coding environments, use the tool switcher at the top of the page.

Installing the GitHub Copilot extension in Vim/Neovim

GitHub recommends that you install the GitHub Copilot plugin with Vim/Neovim's built-in plugin manager. Alternatively, you can use a plugin manager of your choice to install github/copilot.vim. For more information, see the copilot.vim repository.

  1. Make sure you have access to GitHub Copilot. For information, see What is GitHub Copilot?.

  2. Make sure you have a compatible version of Vim/Neovim installed. To use GitHub Copilot in Vim/Neovim you must have Vim version 9.0.0185 / Neovim version 0.6 or above and Node.js version 18 or above. See the Vim / Neovim documentation and the Node.js website.

  3. Install GitHub Copilot using the built-in plugin manager:

    • For Neovim on macOS or Linux, run the following command in the terminal.

      Shell
      git clone https://github.com/github/copilot.vim \
      ~/.config/nvim/pack/github/start/copilot.vim
      
    • For Neovim on Windows, run the following command in Git Bash:

      Shell
      git clone https://github.com/github/copilot.vim.git \
      $HOME/AppData/Local/nvim/pack/github/start/copilot.vim
      
    • For Vim on macOS or Linux, run the following command in the terminal.

      Shell
      git clone https://github.com/github/copilot.vim \
      ~/.vim/pack/github/start/copilot.vim
      
    • For Vim on Windows, run the following command in Git Bash:

      Shell
      git clone https://github.com/github/copilot.vim.git \
      $HOME/vimfiles/pack/github/start/copilot.vim
      
  4. To configure GitHub Copilot, open Vim/Neovim and enter the following command.

    Shell
    :Copilot setup
    
  5. Enable GitHub Copilot in your Vim/Neovim configuration, or with the Vim/Neovim command.

    Shell
    :Copilot enable
    

Next steps