Skip to main content
I have Visual Studio Code open with the project I’m about to work on. In this guide we’ll install and configure GitHub Copilot so it can assist while you code.

Install the extension

  1. Open View → Extensions (or press Ctrl+Shift+X / Cmd+Shift+X).
  2. Search for “GitHub” and locate GitHub Copilot.
  3. Click Install. After installation the extension will prompt you to sign in to GitHub via your browser if you haven’t already authenticated.
If you already have GitHub authentication configured in VS Code (for example via the official “GitHub” extension), Copilot will reuse that and you can skip the browser login. Example terminal prompt you may see while signing in:

About GitHub Copilot Chat

When you install GitHub Copilot, the “GitHub Copilot Chat” extension is often added alongside it. Open the Copilot Chat panel from the status area (lower-right). Unlike a standard web chat, Copilot Chat can read the files in your workspace to provide context-aware suggestions—this makes generated code, refactors, and explanations more relevant to the project you’re editing.
GitHub Copilot Chat can read files in your workspace to provide context-aware suggestions and to help with code generation, refactors, and explanations.
You can enable or disable inline completions from the Copilot menu. Some developers prefer to disable completions while sketching ideas and re-enable them when ready for suggestions.
A screenshot of the GitHub Copilot menu in a dark-themed editor showing options like "Status: Ready," "GitHub Copilot Chat," and "Disable Completions." A hand-shaped cursor is hovering over the "Disable Completions" option.

Settings overview

GitHub Copilot exposes several settings inside VS Code. Review these areas to tailor Copilot to your workflow:
A screenshot of an editor's Settings panel showing GitHub Copilot configuration. It displays an "Enable Auto Completions" checkbox and a table listing languages with true/false values for Copilot completions.

Common Copilot settings examples

  • Enable Copilot for all files except a few types:
    • In Settings JSON: "{ \"*\": true, \"plaintext\": false, \"markdown\": false }"
  • Disable inline completions temporarily via the Copilot menu or Settings.
Experimental or preview features can add capabilities but may be unstable. Enable preview features only if you want to test new behavior and accept potential instability.

Tips on language-specific settings

  • YAML: Copilot often generates helpful YAML for CI/CD and configuration files, but it can also produce irrelevant suggestions. Toggle Copilot for YAML per project if it becomes noisy.
  • Experimental features: Enable preview features selectively when you want to try new capabilities, but be aware they can change frequently.

Workspace instructions via settings.json

You can provide project-specific instructions that Copilot Chat will consult during code generation. Add these to your workspace settings.json to encode style or domain-specific guidance:
This is useful to keep repository-wide conventions consistent when generating code with Copilot.

Example code context (Flask)

Copilot is most useful when it can read and reason about your existing project files. Below is a small, corrected Flask example that Copilot can use as context to suggest completions or new routes:
Keep your code well-structured and properly documented—Copilot performs best when it has clear context from existing files.

Next steps

Once Copilot and Copilot Chat are installed and configured:
  • Try inline completions while editing real files to see contextual suggestions.
  • Use the Copilot Chat pane to ask for code generation, explanations, or refactors—because the chat can read your workspace, answers are tailored to your codebase.
  • Iterate on your workspace settings.json instructions to bake in repository conventions (naming, formatting, commit messages).
Try different workflows (completions on/off, chat prompts, project-specific instructions) to refine how Copilot supports your development process.

Watch Video