GitHub Copilot Installation & Setup Guide for VS Code and JetBrains IDEs (2026)

GitHub Copilot Installation & Setup Guide for VS Code and JetBrains IDEs

GitHub Copilot is an AI-powered coding assistant that provides real-time code suggestions, chat-based help, and workspace-aware intelligence. This guide walks you through installing, configuring, and optimizing Copilot across VS Code and JetBrains IDEs, including language-specific tuning, Copilot Chat, workspace indexing, and organization policy management.

Prerequisites

  • A GitHub account with an active Copilot subscription (Individual, Business, or Enterprise)- VS Code 1.90+ or a JetBrains IDE (IntelliJ IDEA, PyCharm, WebStorm, etc.) version 2024.1+- Node.js 18+ (recommended for workspace indexing features)- Stable internet connection for initial authentication

Step 1: Install the GitHub Copilot Extension

VS Code Installation

  • Open VS Code and navigate to the Extensions panel (Ctrl+Shift+X / Cmd+Shift+X).- Search for GitHub Copilot and click Install. This installs both the inline suggestion engine and Copilot Chat.- Alternatively, install from the command line:code —install-extension GitHub.copilot code —install-extension GitHub.copilot-chat- Reload VS Code when prompted. A Copilot icon will appear in the status bar.- Click the icon and select Sign in to GitHub. Complete the OAuth flow in your browser.

JetBrains IDE Installation

  • Open your JetBrains IDE and go to Settings → Plugins → Marketplace.- Search for GitHub Copilot and click Install.- Restart the IDE when prompted.- Navigate to Settings → Tools → GitHub Copilot and click Login to GitHub.- Copy the device code, open the verification URL in your browser, and paste the code to authorize.

Step 2: Configure Language-Specific Suggestions

Copilot supports all major languages but you can fine-tune which languages receive suggestions.

VS Code — settings.json

{ “github.copilot.enable”: { ”*”: true, “python”: true, “javascript”: true, “typescript”: true, “markdown”: false, “plaintext”: false, “yaml”: true }, “github.copilot.advanced”: { “inlineSuggestCount”: 3, “length”: 500 } }

JetBrains — Language Filters

  • Go to Settings → Tools → GitHub Copilot → Languages.- Toggle individual languages on or off. For example, disable Copilot for .env and .properties files to avoid leaking secrets.- Use file pattern exclusions to block suggestions in sensitive directories:
    # In .copilotignore (place in project root)
    .env
    config/secrets/**
    *.pem
    *.key

Step 3: Set Up Copilot Chat

Copilot Chat provides a conversational interface for code explanation, generation, test writing, and debugging.

VS Code Chat Configuration

  • Open Chat with Ctrl+Shift+I (or Cmd+Shift+I on macOS).- Use slash commands for targeted actions:
    CommandPurposeExample
    /explainExplain selected codeSelect a function, then type /explain
    /fixSuggest a fix for errorsHighlight a bug, type /fix
    /testsGenerate unit tests/tests for the selected function
    /docGenerate documentation/doc add JSDoc comments
    @workspaceQuery the entire project@workspace how is auth handled?

JetBrains Chat

  • Open the Copilot Chat tool window from View → Tool Windows → GitHub Copilot Chat.- The same slash commands work in JetBrains. Right-click any code selection and choose Copilot → Explain This for quick inline help.# Example: Ask Copilot Chat to generate a Python test /tests Write pytest tests for the calculate_discount function in pricing.py

Step 4: Enable Workspace Indexing

Workspace indexing allows Copilot to understand your entire codebase for more relevant suggestions and accurate @workspace answers.

VS Code

{ “github.copilot.chat.codeGeneration.useWorkspaceContext”: true, “github.copilot.chat.indexing.enabled”: true, “github.copilot.chat.indexing.maxFiles”: 5000 }- After enabling, VS Code will index your workspace in the background. Check progress in the Output panel under GitHub Copilot.- For large monorepos, create a .copilotignore file to exclude build artifacts, node_modules, and vendor directories from indexing.

JetBrains

  • Go to Settings → Tools → GitHub Copilot → Indexing.- Enable Project-wide context and configure excluded directories.- Indexing respects your existing .gitignore patterns automatically.

Step 5: Organization Policy Settings

For Copilot Business and Enterprise plans, administrators can enforce policies across the organization.

GitHub Organization Admin Panel

  • Go to github.com → Organization → Settings → Copilot → Policies.- Configure key policies:
    PolicyDescriptionRecommended Setting
    Suggestions matching public codeBlock suggestions that match public repositoriesBlocked (for enterprise compliance)
    Copilot Chat in IDEEnable or disable Chat featuresEnabled
    Copilot in CLIAllow Copilot in GitHub CLIEnabled
    Editor suggestionsAllow inline code completionsEnabled
    Content exclusionsPrevent Copilot from accessing specific repos or pathsConfigure per-repo

Content Exclusion via Organization Settings

# In Organization Settings → Copilot → Content Exclusions

Add repository-level exclusions:

repository: my-org/secrets-repo paths:

  • ”**/*.env”
  • “config/production/**”
  • ”**/credentials.*“

Managing Seat Assignments via CLI

# List current Copilot seat assignments
gh api /orgs/YOUR_ORG/copilot/billing/seats --paginate

# Add a user to Copilot
gh api --method POST /orgs/YOUR_ORG/copilot/billing/selected_users \
  -f selected_usernames[]="developer-username"

# Remove a user
gh api --method DELETE /orgs/YOUR_ORG/copilot/billing/selected_users \
  -f selected_usernames[]="developer-username"

Pro Tips

  • Trigger multiple suggestions: Press Ctrl+Enter in VS Code to open the Copilot completions panel showing up to 10 alternative suggestions.- Inline chat: Press Ctrl+I in VS Code to open an inline chat prompt directly in your editor without switching context.- Custom instructions: Create a .github/copilot-instructions.md file in your repository root to provide project-specific context to Copilot. For example: This project uses FastAPI with SQLAlchemy. Always use async/await patterns and Pydantic v2 models.- Keyboard shortcuts for JetBrains: Use Alt+</code> to manually trigger a suggestion and Tab to accept it. Use Alt+] and Alt+[ to cycle through alternatives.- Prompt engineering: Write a descriptive comment before a function to get better suggestions. Include parameter types, return values, and edge cases in your comment.

Troubleshooting

IssueCauseSolution
Copilot icon shows "Inactive"Authentication expired or subscription lapsedClick the icon and re-authenticate. Verify your subscription at github.com/settings/copilot
No suggestions appearingLanguage disabled or file excludedCheck github.copilot.enable settings and .copilotignore file
Chat returns "Unable to process"Workspace index not built or too largeReduce maxFiles or add exclusions. Restart the extension host
JetBrains plugin not loadingIncompatible IDE versionUpdate to version 2024.1 or later. Reinstall the plugin
Organization policy blocking suggestionsAdmin-enforced content exclusionContact your GitHub org admin to review Copilot policy settings
High latency on suggestionsNetwork or proxy configurationConfigure proxy in IDE settings. Set "http.proxy" in VS Code or JetBrains HTTP settings
## Frequently Asked Questions

Can I use GitHub Copilot offline?

No. GitHub Copilot requires an active internet connection to generate suggestions because the AI model runs on GitHub's cloud servers. However, once suggestions are accepted into your code, you can work offline normally. The Copilot Chat feature also requires connectivity for every interaction.

How do I prevent Copilot from suggesting code that matches public repositories?

For individual users, go to github.com → Settings → Copilot and enable the Block suggestions matching public code filter. For organizations, administrators can enforce this policy at Organization → Settings → Copilot → Policies → Suggestions matching public code → Blocked. This applies a duplication detection filter that suppresses suggestions closely matching publicly available code.

Does GitHub Copilot work with all programming languages?

Copilot supports virtually all languages that appear in public repositories, but it performs best with languages that have extensive training data: Python, JavaScript, TypeScript, Java, C#, C++, Go, Ruby, and Rust. For less common languages, suggestions may be less accurate. You can improve results by providing detailed comments and using the .github/copilot-instructions.md file to specify language conventions and frameworks used in your project.

Explore More Tools

Grok Best Practices for Real-Time News Analysis and Fact-Checking with X Post Sourcing Best Practices Devin Best Practices: Delegating Multi-File Refactoring with Spec Docs, Branch Isolation & Code Review Checkpoints Best Practices Bolt Case Study: How a Solo Developer Shipped a Full-Stack SaaS MVP in One Weekend Case Study Midjourney Case Study: How an Indie Game Studio Created 200 Consistent Character Assets with Style References and Prompt Chaining Case Study How to Install and Configure Antigravity AI for Automated Physics Simulation Workflows Guide How to Set Up Runway Gen-3 Alpha for AI Video Generation: Complete Configuration Guide Guide Replit Agent vs Cursor AI vs GitHub Copilot Workspace: Full-Stack Prototyping Compared (2026) Comparison How to Build a Multi-Page SaaS Landing Site in v0 with Reusable Components and Next.js Export How-To Kling AI vs Runway Gen-3 vs Pika Labs: Complete AI Video Generation Comparison (2026) Comparison Claude 3.5 Sonnet vs GPT-4o vs Gemini 1.5 Pro: Long-Document Summarization Compared (2025) Comparison Midjourney v6 vs DALL-E 3 vs Stable Diffusion XL: Product Photography Comparison 2025 Comparison Runway Gen-3 Alpha vs Pika 1.0 vs Kling AI: Short-Form Video Ad Creation Compared (2026) Comparison BMI Calculator - Free Online Body Mass Index Tool Calculator Retirement Savings Calculator - Free Online Planner Calculator 13-Week Cash Flow Forecasting Best Practices for Small Businesses: Weekly Updates, Collections Tracking, and Scenario Planning Best Practices 30-60-90 Day Onboarding Plan Template for New Marketing Managers Template Accounts Payable Automation Case Study: How a Multi-Location Restaurant Group Cut Invoice Processing Time With OCR and Approval Routing Case Study Amazon PPC Case Study: How a Private Label Supplement Brand Lowered ACOS With Negative Keyword Mining and Exact-Match Campaigns Case Study Antigravity vs Jasper vs Copy.ai: AI Brand Voice Consistency Compared (2026) Comparison Apartment Move-Out Checklist for Renters: Cleaning, Damage Photos, and Security Deposit Return Checklist