How to Set Up GitHub Copilot in VS Code
Install the GitHub Copilot extension, sign in, and turn on inline code suggestions in a few minutes.
GitHub Copilot suggests whole lines and blocks of code as you type, drawing on the context of your open files. This guide covers the full setup: installing the extension, signing in with GitHub, and confirming that inline suggestions appear. You will need an active Copilot subscription or access through your organization or the free tier.
What you need
- VS Code installed
- A GitHub account
- A Copilot plan: the free tier, Copilot Pro, or org access
- About 5 minutes
Step 1: Install the Copilot extension
Open the Extensions view, search for GitHub Copilot, and install the extension published by GitHub. The companion extension GitHub Copilot Chat installs alongside it and gives you the chat sidebar and inline chat.
Step 2: Sign in with GitHub
After installing, a notification asks you to sign in. Click Sign in to GitHub, approve the request in the browser window that opens, and return to VS Code. The account icon at the bottom left will now show your GitHub identity.
Step 3: Trigger an inline suggestion
Open any code file and start typing a function or a comment describing what you want. Copilot shows a grey ghost-text suggestion. Press Tab to accept it, Esc to dismiss it, or Alt+] and Alt+[ to cycle through alternatives.
Step 4: Confirm Copilot is active
Look at the Copilot icon in the status bar at the bottom of the window. When it is enabled and working, it appears solid. If it shows a slash or a warning, click it to see whether you are signed out, offline, or have disabled completions for the current file type.
{
"github.copilot.enable": {
"*": true,
"markdown": false,
"plaintext": false
}
}Result
Copilot is installed, signed in, and producing inline suggestions. From here you can open the chat sidebar with the chat icon, ask questions about your code, and accept or reject completions as you type.
Watch related tutorials
12:47
18:33
15:21
15:22
1:02:14
18:05