D
DevToolsReview

How to Set Up GitHub Copilot in VS Code in 2026: Complete Guide

Step-by-step guide to installing GitHub Copilot in VS Code, configuring Chat and Edits, and getting the most out of AI code suggestions.

DR

DevTools Review

· Updated March 17, 2026 · 5 min read
GitHub Copilot

GitHub Copilot is the most widely adopted AI coding assistant, and it lives right inside VS Code as a set of extensions. In 2026, Copilot has grown well beyond simple autocomplete — it now includes Copilot Chat for conversational coding, Copilot Edits for multi-file changes, an agent mode for autonomous task execution, and deep integration with the GitHub ecosystem.

This guide takes you from zero to fully configured in about 10 minutes.

Try GitHub Copilot

Prerequisites

Before you begin, make sure you have:

  • VS Code 1.95 or later (older versions may not support all Copilot features — update via Help > Check for Updates)
  • A GitHub account (free accounts work for Copilot Free; paid plans require a subscription)
  • An active Copilot subscription or free tier access — GitHub offers a free tier with limited completions, Copilot Individual ($10/month), and Copilot Business ($19/user/month)
  • A stable internet connection (Copilot processes requests in the cloud)

System Requirements

Copilot runs inside VS Code, so if VS Code runs smoothly on your machine, Copilot will too. No additional system requirements beyond what VS Code itself needs. Works on macOS, Windows, and Linux.

Step 1: Install the GitHub Copilot Extension

Open VS Code and navigate to the Extensions panel by pressing Cmd+Shift+X (Mac) or Ctrl+Shift+X (Windows/Linux). Search for “GitHub Copilot” and click Install.

This installs the main Copilot extension, which bundles:

  • Inline completions — ghost text suggestions as you type
  • Copilot Chat — a conversational AI panel for questions, explanations, and code generation
  • Copilot Edits — multi-file editing powered by natural language instructions

You may also see “GitHub Copilot Chat” as a separate extension. If it doesn’t install automatically with the main extension, install it manually.

Step 2: Sign In to GitHub

After installation, VS Code displays a sign-in prompt in the bottom-right corner. Click Sign in to GitHub and complete the authorization in your browser. VS Code receives an OAuth token and you’re connected.

If the prompt doesn’t appear:

  1. Open the Command Palette with Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
  2. Type GitHub Copilot: Sign In and select it
  3. Follow the browser authorization flow

Once signed in, you’ll see a Copilot icon in the VS Code status bar (bottom-right). A solid icon means Copilot is active. A slashed icon means it’s disabled for the current file type.

Step 3: Verify Copilot Is Working

Open any source file and start typing a function. For example, in a JavaScript file, type:

function calculateTax(income, taxRate) {

Pause briefly. You should see grey ghost text suggesting the function body. Press Tab to accept. If suggestions appear, Copilot is working correctly.

If nothing happens, check the Copilot icon in the status bar. Click it to see the status and ensure it’s enabled for the current language.

Step 4: Learn the Essential Keyboard Shortcuts

Master these shortcuts first — they cover 90% of your daily Copilot interactions:

Inline Completions

ActionMacWindows/Linux
Accept suggestionTabTab
Dismiss suggestionEscEsc
Next suggestionAlt+]Alt+]
Previous suggestionAlt+[Alt+[
Accept word by wordCmd+Right ArrowCtrl+Right Arrow
Trigger suggestion manuallyAlt+\Alt+\

Copilot Chat

ActionMacWindows/Linux
Open Chat panelCmd+Shift+ICtrl+Shift+I
Inline Chat (on selection)Cmd+ICtrl+I
Quick ChatCmd+Shift+Alt+LCtrl+Shift+Alt+L

Copilot Edits

ActionMacWindows/Linux
Open Edits panelCmd+Shift+ICtrl+Shift+I

Step 5: Configure Copilot Settings

Open VS Code settings with Cmd+, (Mac) or Ctrl+, (Windows/Linux) and search for copilot. Here are the settings worth adjusting right away:

Enable/Disable by Language

Control where Copilot makes suggestions. Add entries to your settings.json:

{
  "github.copilot.enable": {
    "*": true,
    "markdown": false,
    "plaintext": false,
    "yaml": true,
    "json": false
  }
}

This keeps Copilot active for code files but disables it for prose and config files where suggestions tend to be noisy.

Inline Suggestion Display

Make sure inline suggestions are enabled:

{
  "editor.inlineSuggest.enabled": true
}

Content Exclusions (Business/Enterprise)

If you’re on a Copilot Business or Enterprise plan, admins can configure content exclusion rules to prevent Copilot from accessing specific files or repositories. Individual users can also exclude files in their settings:

{
  "github.copilot.advanced": {
    "excludeFiles": ["**/secrets/**", "**/.env*"]
  }
}

Step 6: Use Copilot Chat

Open the Chat panel with Cmd+Shift+I (Mac) or Ctrl+Shift+I (Windows/Linux). Copilot Chat understands your workspace context and can answer questions about your code.

Chat Participants

Use @-mentions to direct your questions to specific contexts:

  • @workspace — asks about your entire project (“@workspace How is authentication handled?”)
  • @vscode — asks about VS Code settings and features (“@vscode How do I change the font size?”)
  • @terminal — asks about terminal output (“@terminal Why did that command fail?”)

Slash Commands in Chat

Use slash commands for common tasks:

  • /explain — explain the selected code
  • /fix — propose a fix for problems in the selected code
  • /tests — generate tests for the selected code
  • /doc — generate documentation comments
  • /new — scaffold a new project or file
  • /clear — clear the chat history

Inline Chat

Select a block of code and press Cmd+I (Mac) or Ctrl+I (Windows/Linux) to open inline chat directly in the editor. This is perfect for quick, targeted edits:

  • “Refactor this to use async/await”
  • “Add JSDoc comments”
  • “Handle the null case”

The changes appear as a diff you can accept or reject.

Step 7: Use Copilot Edits for Multi-File Changes

Copilot Edits lets you describe a change in natural language and have Copilot apply it across multiple files. Open it from the Chat panel by switching to the Edits tab, or use the Command Palette and search for Copilot Edits.

To use Edits effectively:

  1. Add the files you want Copilot to modify by clicking Add Files or referencing them in your prompt
  2. Describe the change: “Add input validation to all API route handlers” or “Convert these class components to functional components with hooks”
  3. Review the proposed changes file by file
  4. Accept or reject each change individually

Edits is especially powerful for refactoring tasks that touch many files at once.

Step 8: Try Agent Mode

Copilot’s agent mode (available in newer VS Code versions) can autonomously plan and execute multi-step tasks. It can:

  • Read your project files and understand the structure
  • Run terminal commands to install dependencies, run tests, or check builds
  • Iterate based on error output
  • Create and modify multiple files

To use agent mode, open Copilot Chat and describe a larger task. Copilot will propose a plan with steps it wants to take, and you approve each action before it executes.

Example prompts for agent mode:

  • “Set up a new Express API with TypeScript, including tsconfig, package.json, and a health check endpoint”
  • “Find and fix the bug causing the login form to submit twice”
  • “Add unit tests for all utility functions in the utils/ directory”

Step 9: Optimize Your Workflow for Better Suggestions

These practices significantly improve the quality of Copilot’s output:

Write descriptive function names. A function called parseCSVAndReturnUserObjects gives Copilot far more context than process. Good names act as prompts.

Keep related files open in tabs. Copilot uses your open editor tabs as context. If you’re writing a service that calls a model, keep the model file open in another tab.

Use comments as prompts. Type a comment describing what the next block of code should do, then pause:

# Fetch all active users from the database,
# sorted by last login date, limited to 50 results

Copilot will generate the implementation below your comment.

Provide type annotations. Copilot produces better suggestions when it can see types. Add interfaces, type aliases, or function signatures before writing the implementation.

Use a .github/copilot-instructions.md file. Place a markdown file at .github/copilot-instructions.md in your repository to give Copilot project-wide context. Describe your stack, coding conventions, and preferences:

This project uses Next.js 14 with the App Router and TypeScript.
We use Prisma for database access and Zod for validation.
Follow existing patterns in the codebase for error handling.
All API responses should use the standard ApiResponse<T> wrapper type.

Troubleshooting Common Issues

No suggestions appearing? Check the Copilot icon in the status bar. If it shows a diagonal line, Copilot is disabled for that language. Click the icon to toggle it. Also verify your subscription is active by visiting github.com/settings/copilot.

Suggestions are slow or intermittent? Copilot depends on a cloud connection. Check your network. If you’re behind a corporate proxy or firewall, configure the proxy in VS Code settings:

{
  "http.proxy": "http://your-proxy:8080",
  "http.proxyStrictSSL": false
}

Low-quality or irrelevant suggestions? Make sure your project has enough context. Copilot performs better in well-structured files with clear naming and type annotations. Keep related files open in tabs. Add a .github/copilot-instructions.md file with project conventions.

Chat not responding or showing errors? Try signing out and back in: open the Command Palette (Cmd+Shift+P), run GitHub Copilot: Sign Out, then sign in again. Also check that the Copilot Chat extension is installed and enabled.

“Copilot is not available” message? Your subscription may have expired, or your organization may have disabled Copilot. Visit github.com/settings/copilot to check your status. If you’re on an organization plan, contact your GitHub admin.

Extensions conflicting with Copilot? If you have other AI coding extensions installed (Tabnine, Codeium, etc.), they may conflict with Copilot’s inline suggestions. Disable other AI suggestion extensions while using Copilot.

Copilot suggestions appearing in files where you don’t want them? Use the language-specific enable/disable settings shown in Step 5 to turn Copilot off for specific file types.

Next Steps

You’re fully set up with GitHub Copilot in VS Code. Here’s where to go from here:

Try GitHub Copilot
DR

Written by DevTools Review

We're developers who use AI coding tools every day. Our reviews are based on real-world experience, not press releases. We test with real projects and share what we actually find.

Newsletter

Stay ahead of AI coding tools

Weekly roundup of new features, pricing changes, and honest takes. No spam, unsubscribe anytime.

Join 2,000+ developers. Free forever.