Setting Up Copilot in Your IDE
Getting GitHub Copilot running in your development environment takes just a few minutes. This lesson covers installation for the most popular IDEs and essential configuration options.
Prerequisites
Before installing Copilot, you need:
- A GitHub account - Create one at github.com if you don't have one
- A Copilot subscription - Individual, Business, or Enterprise plan (or free tier)
- A supported IDE - VS Code, JetBrains IDEs, Neovim, or Visual Studio
Installing Copilot in VS Code
VS Code is the most popular editor for Copilot. Here's how to set it up:
Step 1: Install the Extension
- Open VS Code
- Click the Extensions icon in the sidebar (or press
Ctrl+Shift+X/Cmd+Shift+X) - Search for "GitHub Copilot"
- Click Install on the official GitHub Copilot extension
- Also install GitHub Copilot Chat for the chat interface
Step 2: Sign In to GitHub
- After installation, you'll see a GitHub icon in the status bar
- Click it and select Sign in to GitHub
- A browser window opens - authorize the extension
- Return to VS Code - you're now connected
Step 3: Verify Installation
Create a new file and start typing. You should see ghost text suggestions appear:
# Try typing this comment and see Copilot suggest the implementation
def calculate_average(numbers):
If you see gray suggestion text, Copilot is working.
Installing Copilot in JetBrains IDEs
Copilot works in all JetBrains IDEs: IntelliJ IDEA, PyCharm, WebStorm, GoLand, PhpStorm, and more.
Step 1: Install the Plugin
- Open your JetBrains IDE
- Go to Settings/Preferences → Plugins
- Click the Marketplace tab
- Search for "GitHub Copilot"
- Click Install and restart the IDE
Step 2: Authenticate
- After restart, go to Tools → GitHub Copilot → Login to GitHub
- Copy the device code shown
- Open the GitHub authentication page in your browser
- Paste the code and authorize
Step 3: Configure Shortcuts
JetBrains IDEs use different default shortcuts:
| Action | Shortcut |
|---|---|
| Accept suggestion | Tab |
| Dismiss suggestion | Escape |
| Next suggestion | Alt+] |
| Previous suggestion | Alt+[ |
| Open Copilot Chat | Ctrl+Shift+C |
Installing Copilot in Neovim
For Neovim users, Copilot has an official plugin.
Using vim-plug
Add to your init.vim:
Plug 'github/copilot.vim'
Then run :PlugInstall.
Using lazy.nvim
Add to your Lua config:
{
"github/copilot.vim",
}
Authentication
Run :Copilot setup and follow the browser authentication flow.
Key Mappings
Default Neovim mappings:
| Action | Shortcut |
|---|---|
| Accept suggestion | Tab |
| Dismiss | Ctrl+] |
| Next suggestion | Alt+] |
| Previous suggestion | Alt+[ |
Installing Copilot in Visual Studio
For Visual Studio 2022 users:
- Go to Extensions → Manage Extensions
- Search for "GitHub Copilot"
- Download and install
- Restart Visual Studio
- Sign in via Tools → Options → GitHub Copilot
Essential VS Code Settings
Customize Copilot's behavior in VS Code settings (Ctrl+, / Cmd+,):
Enable/Disable for Specific Languages
{
"github.copilot.enable": {
"*": true,
"markdown": false,
"plaintext": false
}
}
Inline Suggestions Settings
{
"editor.inlineSuggest.enabled": true,
"github.copilot.inlineSuggest.enable": true
}
Copilot Chat Settings
{
"github.copilot.chat.localeOverride": "en",
"github.copilot.chat.welcomeMessage": "always"
}
Keyboard Shortcuts Reference (VS Code)
Master these shortcuts to work efficiently with Copilot:
| Action | Windows/Linux | macOS |
|---|---|---|
| Accept suggestion | Tab | Tab |
| Dismiss suggestion | Escape | Escape |
| Show next suggestion | Alt+] | Option+] |
| Show previous suggestion | Alt+[ | Option+[ |
| Accept word | Ctrl+Right | Cmd+Right |
| Open Copilot Chat | Ctrl+Shift+I | Cmd+Shift+I |
| Inline Chat | Ctrl+I | Cmd+I |
Verifying Your Setup
Test that everything works:
- Create a test file -
test.jsortest.py - Write a comment describing a function
- Press Enter and wait for suggestions
- Accept with Tab if the suggestion looks correct
Example test:
// Function that reverses a string
// Copilot should suggest something like:
function reverseString(str) {
return str.split('').reverse().join('');
}
Troubleshooting Common Issues
No Suggestions Appearing
- Check your subscription status at github.com/settings/copilot
- Verify the extension is enabled (check the Copilot icon in status bar)
- Try restarting your IDE
- Check if Copilot is disabled for the current file type
Authentication Issues
- Sign out and sign back in
- Clear VS Code's stored credentials
- Check your GitHub account has Copilot access
Slow Suggestions
- Check your internet connection
- Copilot needs network access to generate suggestions
- Large files may take longer to process
Summary
Setting up GitHub Copilot involves installing the extension for your IDE, authenticating with GitHub, and optionally customizing settings. The key shortcuts to remember are:
- Tab to accept suggestions
- Escape to dismiss
- Alt+] / Alt+[ to cycle through alternatives
With Copilot installed, you're ready to learn how to write effective prompts that guide Copilot to generate exactly the code you need.

