Getting Started with GitHub Copilot in VS Code

Please be aware that when signing up for the free trial of GitHub Copilot you will be asked to submit a form of payment even though you will not be charged until the free trial is over. Ensure you cancel before the 30 days is over to avoid payment.

Signing Up to GitHub Copilot

Before you can start using GitHub Copilot, you need to set up a free trial or subscription for your personal account.

You can do so by selecting your profile photo and then selecting Settings. Copilot is on the left-hand menu under Code, planning, and automation.

Add the Visual Studio Code extension

Follow these steps to add the Visual Studio Code extension for GitHub Copilot.

  1. In the Visual Studio Code Marketplace, go to the GitHub Copilot extension page and select Install.
  2. A popup appears asking to open Visual Studio Code. Select Open.
  3. In the Extension: GitHub Copilot tab in Visual Studio Code, select Install.
  4. If you haven’t previously authorized Visual Studio Code in your GitHub account, you’re prompted to sign in to GitHub in Visual Studio Code. Select Sign in to GitHub.

GitHub Copilot can autocomplete code as you type when you use Visual Studio Code. After installation, you can enable or disable GitHub Copilot, and you can configure advanced settings within Visual Studio Code.

Enable or disable GitHub Copilot in Visual Studio Code

  1. To enable or disable GitHub Copilot, select the status icon in the bottom panel of the Visual Studio Code window
  2. When disabling GitHub Copilot, you’re asked whether you want to disable suggestions globally, or for the language of the file you’re currently editing.
    • To disable suggestions from GitHub Copilot globally, select Disable Globally.
    • To disable suggestions from GitHub Copilot for a specified language, select Disable for LANGUAGE.

Enable or disable inline suggestions in Visual Studio Code

  1. In the File menu, navigate to Preferences and select Settings.
  2. In the left-side panel of the settings tab, select Extensions, then select Copilot.
  3. Under Inline Suggest: Enable, select or deselect the checkbox to enable or disable inline suggestions

Additionally, you can choose to enable or disable inline suggestions and specify for which languages you want to enable or disable GitHub Copilot.

Leave a Reply