반응형

Updates: November 6, 2024
Contents: Steps to install GitHub Copilot in NVim or Vim (Linux, Ubuntu)

Prerequisites

To use GitHub Copilot in Neovim / Vim, you must have:

  • Neovim version 0.6 or above or Vim version 9.0.0185 or above
  • Node.js version 18 or above

For more information, see the Vim/Neovim documentation and the Node.js website.

Download GitHub Copilot Plugin

  • For NVim:
    git clone https://github.com/github/copilot.vim \
    ~/.config/nvim/pack/github/start/copilot.vim
  • For Vim:
    git clone https://github.com/github/copilot.vim \
    ~/.vim/pack/github/start/copilot.vim
 

Install GitHub Copilot

  1. Open NVim or Vim.
  2. Run the command:
    :Copilot setup
    :Copilot enable

    This command will download and install all the plugins listed in your configuration file.

GitHub Authentication

If GitHub authentication is required, follow these steps:

  1. Update package lists and install GitHub CLI:
    sudo apt update
    sudo apt install gh
  2. For Windows users using WSL, install wslu:
    sudo apt install wslu
  3. Authenticate with GitHub:
    BROWSER=/mnt/c/Windows/explorer.exe gh auth login
     This command sets the browser to Windows Explorer and initiates the GitHub authentication process.

References

 

사용자 환경에 GitHub Copilot 확장 설치 - GitHub Docs

선호하는 코딩 환경에서 Copilot을(를) 사용하려면 GitHub Copilot 확장을 설치해야 합니다.

docs.github.com

 

반응형

+ Recent posts