Set up GitHub Copilot in VS Code
This guide walks you through setting up GitHub Copilot in Visual Studio Code. To use Copilot in VS Code, you need to have access to GitHub Copilot with your GitHub account.
If you don't yet have a Copilot subscription, you can use Copilot for free by signing up for theCopilot Free plan and get a monthly limit of completions and chat interactions.
Get access to GitHub Copilot
There are different ways to get access to GitHub Copilot:
Type of User | Description |
---|---|
Individual |
|
Organization/Enterprise member |
|
Set up Copilot in VS Code
To use Copilot in VS Code, you need access to a GitHub Copilot subscription.
To set up Copilot in VS Code:
Hover over the Copilot icon in the Status Bar and selectSet up Copilot.
SelectSign in to sign in to your GitHub account orUse Copilot if you're already signed in.
If you don't have a Copilot subscription yet, you'll be signed up for theCopilot Free plan.
ImportantTelemetry in your free version of GitHub Copilot is currently enabled. By default, code suggestions that match public code, including code references in the VS Code and <github.com> experience, are allowed. You can opt out of telemetry data collection by disabling telemetry in VS Code by settingtelemetry.telemetryLevel to
off
, or you can adjust both telemetry and code suggestion settings inCopilot Settings.You can now start using Copilot in VS Code. Learn the basics with theCopilot Quickstart.
Use a different GitHub account with Copilot
If your Copilot subscription is associated with another GitHub account, sign out of your GitHub account in VS Code, and sign in with another account.
Select theAccounts menu in the Activity Bar, and then selectSign out for the account you're currently signed in with for Copilot.
Sign in to your GitHub account using any of the following methods:
SelectSign in to use Copilot from the Copilot status menu.
Select theAccounts menu in the Activity Bar, and then selectSign in with GitHub to use GitHub Copilot.
Run theGitHub Copilot: Sign in command in the Command Palette (⇧⌘P (Windows, LinuxCtrl+Shift+P)).
Hide Copilot in VS Code
To completely hide Copilot in VS Code, selectHide Copilot from the Copilot menu in the VS Code title bar.
To reenable Copilot, run theChat: Use AI Features with Copilot for Free command in the Command Palette (⇧⌘P (Windows, LinuxCtrl+Shift+P)).
Disable Copilot for a workspace
To disable Copilot for a specific workspace:
- Open the Extensions view in VS Code (⇧⌘X (Windows, LinuxCtrl+Shift+X)).
- Search for theGitHub Copilot extension.
- Select the gear icon and then selectDisable (Workspace).
- SelectRestart extensions.
- You can re-enable it later by selecting theEnable (Workspace) button that appears after restarting extensions.
Next steps
- Continue with theCopilot Quickstart to discover the key features of Copilot in VS Code.