How to Use GitHub Copilot With VS Code Profiles for Different Projects
🔍 WiseChecker

How to Use GitHub Copilot With VS Code Profiles for Different Projects

You have multiple VS Code windows open for different projects. Each project needs different Copilot settings. One project uses Python and requires Copilot suggestions for data science code. Another project uses JavaScript and needs Copilot to follow a strict style guide. Manually switching Copilot settings every time you change projects wastes time and leads to errors. This article shows you how to create separate VS Code profiles. Each profile stores its own Copilot configuration. You can switch between profiles instantly and keep each project isolated.

Key Takeaways: Project-Specific Copilot with VS Code Profiles

  • VS Code Profile command palette: Create a new profile by running “Preferences: Create Profile” from the Command Palette (Ctrl+Shift+P).
  • Copilot settings per profile: Enable or disable Copilot, change inline suggestions, and set repository-level rules independently for each profile.
  • Profile switching shortcut: Use Ctrl+Alt+P to open the profile switcher and change profiles without closing or reopening VS Code.

How VS Code Profiles Work with GitHub Copilot

VS Code profiles let you create separate sets of settings, extensions, and keybindings. Each profile is a sandboxed configuration that does not affect other profiles. When you enable GitHub Copilot in a profile, the Copilot extension runs with the settings stored in that profile only. This means you can have Copilot active in one profile and disabled in another. You can also set different Copilot inline suggestion modes, disable Copilot for certain file types, or load custom repository-level rules per profile.

The Copilot extension itself does not have profile-aware logic. It reads settings from the active VS Code profile at runtime. When you switch profiles, VS Code reloads the extension with the new settings. This is transparent to you. You do not need to restart VS Code or reinstall the extension. The profile system handles the configuration swap automatically.

Before you start, install the GitHub Copilot extension in the default profile. The extension will be available in all profiles once installed. You do not need to install it separately for each profile. The profile system shares extensions across profiles by default. You can change this behavior by setting the extension to be profile-specific, but for Copilot this is not required.

Create a VS Code Profile for Each Project

You need one profile per distinct project type. For example, create a profile named “Data Science” for Python notebooks and a profile named “Web Dev” for JavaScript projects. Follow the steps below to create each profile.

  1. Open the Command Palette
    Press Ctrl+Shift+P to open the Command Palette. Type “Preferences: Create Profile” and select the command from the list. This opens the profile creation dialog.
  2. Name the profile
    In the dialog, enter a descriptive name for the profile. Use a name that matches the project type, such as “DataScience” or “WebDev”. Click the “Create” button. VS Code creates the new profile and switches to it automatically.
  3. Configure Copilot settings for the profile
    Open Settings by pressing Ctrl+, (comma). Type “Copilot” in the search bar. Adjust the settings you want for this profile. For example, set “GitHub Copilot: Enable Auto Completions” to enabled or disabled. Set “GitHub Copilot: Inline Suggest” to enabled or disabled. These settings apply only to this profile.
  4. Set repository-level rules if needed
    If your project requires specific Copilot rules, create a .github/copilot-instructions.md file in the project root. Copilot reads this file only when the active profile has the correct workspace folder open. The rules in this file apply to that project regardless of the profile. However, the profile settings for enable/disable override the file.
  5. Save and test the profile
    Open a file from the project. Start typing code. Copilot should behave according to the settings you configured. If Copilot does not appear, check that the extension is enabled in the profile. You can verify this by opening the Extensions view (Ctrl+Shift+X) and checking the profile indicator next to the Copilot extension.

Repeat the process for each project type. Each profile stores its own settings. You can create up to 50 profiles in VS Code.

Switch Between Profiles Quickly

Switching profiles does not require closing VS Code or reopening the project. Use the profile switcher to change the active profile in seconds.

  1. Open the profile switcher
    Press Ctrl+Alt+P. A dropdown list appears at the top of the window showing all your profiles.
  2. Select the target profile
    Click the profile name you want to switch to. VS Code reloads the window with the new profile. The Copilot extension reloads with the settings from the selected profile.
  3. Confirm the Copilot settings
    Open a file from the project. Start typing. Verify that Copilot behaves according to the profile settings. If the behavior is incorrect, open Settings for the current profile and adjust the Copilot options.

You can also switch profiles from the VS Code status bar. Click the profile icon on the left side of the status bar. A menu appears with all profiles. Select the one you want. This method is useful if you prefer using the mouse.

Common Mistakes When Using Copilot with Profiles

Copilot Extension Not Showing in the New Profile

The Copilot extension is installed globally by default. If you do not see the Copilot icon in the status bar after switching profiles, open the Extensions view. Look for the Copilot extension. If it shows a profile icon with a slash, the extension is disabled for this profile. Click the gear icon next to the extension and select “Enable (Profile)”. The extension activates immediately.

Copilot Settings Not Applying to the Current Project

Copilot settings are global to the profile, not per-workspace. If you have multiple workspaces open in the same profile, they all share the same Copilot settings. To isolate settings further, create a separate profile for each workspace. Open the workspace first, then create a profile while that workspace is active. VS Code saves the workspace association with the profile.

Repository-Level Copilot Rules Are Ignored

Copilot reads repository-level rules from the .github/copilot-instructions.md file only if the file exists in the root of the open workspace. If you have the file in the wrong location or the workspace root is different, Copilot ignores the rules. Check that the file is in the exact path .github/copilot-instructions.md relative to the workspace root. Also verify that the profile has Copilot enabled. Disabled Copilot ignores all rules.

Profile Settings Reset After a VS Code Update

VS Code updates preserve profile settings. However, if you use a preview version or a nightly build, settings may reset. To protect your profiles, export them regularly. Open the Command Palette and run “Preferences: Export Profile”. Save the JSON file. If settings reset, import the profile using “Preferences: Import Profile”.

VS Code Profile Features vs Copilot Project Settings: Key Differences

Item VS Code Profile Features Copilot Project Settings
Scope Global to the profile, applies to all workspaces opened in that profile Per project via copilot-instructions.md file in the repository root
Configuration method Settings UI or settings.json Markdown file with specific YAML front matter
Switch mechanism Profile switcher (Ctrl+Alt+P) or status bar click No switch needed; rules are read automatically when the file is present
Granularity Can enable/disable Copilot entirely, change suggestion mode, and set file-type exclusions Can define custom instructions for code style, library usage, and naming conventions
Persistence across updates Preserved unless manually deleted or exported Preserved in the repository; version-controlled
Sharing with team Export profile JSON and share via version control or file Commit the copilot-instructions.md file to the repository

Use VS Code profiles to control Copilot enablement and suggestion behavior. Use repository-level settings to define project-specific coding rules. The two systems work together. For example, you can have a profile that enables Copilot for a data science project and a copilot-instructions.md file that tells Copilot to prefer pandas functions over raw Python loops.

You can now create separate VS Code profiles for different projects and configure Copilot independently in each profile. Start by creating a profile for your most common project type. Set the Copilot options to match the project requirements. Switch between profiles using Ctrl+Alt+P. For team projects, add a copilot-instructions.md file to the repository to enforce consistent coding rules. An advanced tip: use the “GitHub Copilot: Enable Auto Completions” setting in each profile to disable suggestions for sensitive files, such as configuration files containing secrets, by setting the value to false and adding a file exclusion pattern in settings.json.