Installation and Setup

Installation and Setup

Getting Copilot installed is straightforward. Getting it configured well for your project takes a few extra minutes and pays off every day.

Supported editors

GitHub Copilot works in:

  • Visual Studio Code – the most popular choice; the extension is first-party and most feature-complete
  • JetBrains IDEs – IntelliJ IDEA, PyCharm, WebStorm, GoLand, and others via the Copilot plugin
  • Visual Studio – for .NET and C++ developers
  • Neovim – via a community plugin
  • GitHub.com – Copilot Chat is available directly in the browser for pull request and issue discussions

This lesson focuses on VS Code and JetBrains since they are the most common. The concepts apply everywhere.

Installation in VS Code

  1. Open VS Code and go to the Extensions panel (Ctrl/Cmd + Shift + X).
  2. Search for "GitHub Copilot" β€” install the official extension by GitHub.
  3. Also install "GitHub Copilot Chat" β€” this adds the chat panel.
  4. After installing, VS Code will ask you to sign in with your GitHub account. Complete the OAuth flow in your browser.
  5. Once signed in, you will see a Copilot icon in the status bar at the bottom. A checkmark means it is active.

Installation in JetBrains

  1. Open your JetBrains IDE and go to Settings β†’ Plugins.
  2. Search for "GitHub Copilot" in the Marketplace tab and install it.
  3. Restart the IDE when prompted.
  4. After restart, go to Tools β†’ GitHub Copilot β†’ Login to GitHub. Complete the OAuth flow.
  5. You will see a Copilot icon in the status bar when it is active.

Plans and access

  • Free tier: As of recent GitHub announcements, there is a limited free tier with a monthly cap on completions and chat messages.
  • Copilot Individual: Paid personal subscription with unlimited completions and chat.
  • Copilot Business / Enterprise: For organizations. Adds features like policy controls, no data retention for training, and admin dashboards.

Check github.com/features/copilot for current pricing. If your company has a GitHub organization, ask your admin whether Copilot Business is available to you.

Verifying installation

Open any code file and type a comment:

python
# function to check if a number is prime

Press Enter. Within a second you should see a gray suggestion appear. Press Tab to accept. If nothing appears, check:

  • The Copilot icon in the status bar β€” click it to see status and error messages
  • That you are signed in to the correct GitHub account that has a Copilot subscription
  • That completions are not disabled for the current file type (Settings β†’ Copilot β†’ Enable/Disable)

The copilot-instructions.md file

This is the equivalent of Cursor's .cursorrules β€” a file that gives the AI persistent project-level context. Create it at:

.github/copilot-instructions.md

Write it in plain Markdown. Copilot reads it automatically and includes it in every Chat session. Example:

markdown
# Project Instructions for GitHub Copilot ## Stack - Python 3.11, FastAPI, PostgreSQL, SQLAlchemy 2.0 (async) - Pytest for testing, Ruff for linting ## Conventions - All endpoints are async - Use repository pattern: DB access only in `repositories/`, business logic only in `services/` - Return Pydantic response models from all endpoints - Raise HTTPException for HTTP errors; use custom AppError for domain errors - No print statements in production code; use the structured logger in `core/logger.py` ## Testing - Unit tests mock the repository layer - Integration tests use a test PostgreSQL database via pytest fixtures in conftest.py - Test files live next to the code they test, named `test_<module>.py`

Disabling Copilot for specific files

Some files should not be suggested to the AI β€” files with secrets, large auto-generated files, or files with sensitive data. In VS Code:

  • Click the Copilot icon in the status bar β†’ Disable for this file type
  • Or add to your VS Code settings:
json
{ "github.copilot.enable": { "*": true, ".env": false, "*.pem": false, "*.key": false } }

In JetBrains: right-click the file β†’ Copilot β†’ Disable for this file type.

Keybindings to know

ActionVS Code (Mac)VS Code (Win/Linux)
Accept suggestionTabTab
Dismiss suggestionEscapeEscape
Next suggestionAlt + ]Alt + ]
Previous suggestionAlt + [Alt + [
Open Copilot ChatCtrl + Cmd + ICtrl + Alt + I
Inline Chat (in editor)Cmd + ICtrl + I

The "next/previous suggestion" shortcuts are very useful β€” Copilot often has multiple alternative suggestions. If the first one is not right, press Alt + ] to cycle to the next.