You want to use GitHub Copilot in VS Code to accelerate your open source contributions without mixing personal coding preferences with project-specific settings. VS Code Settings Profiles let you create isolated environments for each repository or contribution workflow. This article explains how to combine Copilot with Settings Profiles so you get relevant suggestions while keeping your workspace clean and project-agnostic.
Key Takeaways: GitHub Copilot and VS Code Settings Profiles for Open Source
- VS Code Settings Profiles > Create Profile: Isolates extensions, settings, and keybindings per project or contribution workflow.
- GitHub Copilot extension per profile: Enable or disable Copilot only in profiles where you need AI assistance for open source repos.
- Copilot inline suggestions toggle: Use Ctrl+Enter to accept a suggestion or Alt+] to cycle through alternatives without leaving the keyboard.
What Are VS Code Settings Profiles and How Copilot Fits In
VS Code Settings Profiles are a feature that lets you create separate configurations for different development contexts. Each profile stores its own set of extensions, user settings, keybindings, and UI state. When you switch profiles, VS Code reloads with only the extensions and settings assigned to that profile.
GitHub Copilot is a VS Code extension that provides AI-powered code suggestions. By default, Copilot activates in every workspace where the extension is installed. This can be problematic when you contribute to multiple open source projects with different coding styles, linting rules, or language preferences. Copilot might suggest code that does not match the project’s conventions.
Using Settings Profiles, you can create one profile per open source project or contribution workflow. In each profile, you install only the extensions relevant to that project. You enable Copilot only in profiles where you want AI assistance. This separation prevents cross-project contamination of settings and ensures Copilot suggestions align with the project’s codebase.
Prerequisites for Using Copilot With Settings Profiles
Before you begin, verify you have the following:
- VS Code version 1.78 or later — Settings Profiles are available from this version onward
- GitHub Copilot extension installed from the VS Code marketplace
- An active GitHub Copilot subscription — free trial, Copilot Pro, or Copilot for Business
- Access to the open source repository you plan to contribute to — cloned locally or opened as a folder
Steps to Create a Settings Profile for Open Source Contributing With Copilot
- Open the Settings Profiles menu
In VS Code, click the gear icon in the lower left corner of the Activity Bar. Select Profiles from the dropdown menu. Alternatively, use the command palette Ctrl+Shift+P and type Profiles: Show Profile. - Create a new profile
In the Profiles view, click the plus icon labeled Create Profile. Name the profile after the open source project, for example, react-contrib or django-contrib. Choose to copy settings from the Default profile or start fresh. - Select extensions for the profile
After creating the profile, VS Code prompts you to choose which extensions to include. Uncheck all extensions except GitHub Copilot and any language-specific extensions required by the project. For a React project, include ESLint, Prettier, and GitHub Copilot. For a Python project, include Python, Pylance, and GitHub Copilot. - Configure Copilot settings for the profile
Open the settings editor Ctrl+,. Switch to the Workspace tab. Search for Copilot. Set GitHub Copilot: Enable Auto Completions to true. Optionally adjust Copilot: Inline Suggest Mode to on or onDemand. Set Copilot: Enable Code Actions to true if you want Copilot to suggest fixes. - Set project-specific Copilot rules
In the same profile, open the command palette Ctrl+Shift+P and type Copilot: Configure Codebase Rules. Add rules that match the project’s coding guidelines. For example, for a JavaScript project, add a rule that says Use const instead of let for immutable variables. - Open the project folder in the profile
Close the current workspace. Use File > Open Folder to open the open source repository. VS Code automatically applies the active profile. If it does not, click the profile name in the status bar and select your project profile. - Test Copilot suggestions
Open a file from the repository. Start typing a function or comment. Copilot should display suggestions in gray inline text. Press Tab to accept the suggestion or Ctrl+Enter to see a list of alternatives. If Copilot does not appear, verify the extension is enabled in the profile and that your subscription is active.
Common Mistakes When Using Copilot With Settings Profiles
Copilot Suggestions Do Not Appear in the Profile
This usually happens when the GitHub Copilot extension is not installed in the active profile. Switch to the profile and open the Extensions view Ctrl+Shift+X. Look for GitHub Copilot in the Installed list. If it is missing, right-click the extension in the global Extensions view and select Add to Profile > your profile name. Restart VS Code after adding the extension.
Copilot Suggests Code That Does Not Match the Project Style
Copilot learns from the current file and similar code in its training data. To improve relevance, add project-specific rules as described in step 5. Also, ensure the profile includes the project’s linting extension, such as ESLint or Pylance. Copilot respects the active linting rules and adjusts suggestions accordingly.
Profile Settings Overlap With Other Profiles
If you notice settings from one profile affecting another, you likely have settings synced via Settings Sync. Disable Settings Sync for profiles you want to keep isolated. Open the command palette Ctrl+Shift+P and type Preferences: Configure Settings Sync. Turn off the settings toggle for the profile. Alternatively, create a new profile from scratch instead of copying from Default.
Copilot Uses Too Many Resources in the Profile
Copilot runs a background process that can consume CPU on large files. In the profile’s settings, set GitHub Copilot: Enable Auto Completions to false. Use on-demand mode by pressing Ctrl+Space to manually trigger suggestions. This reduces resource usage while keeping Copilot available when you need it.
VS Code Settings Profiles vs Workspace Settings: What Works Best for Open Source
| Item | Settings Profiles | Workspace Settings |
|---|---|---|
| Scope | Global per VS Code window | Per project folder or workspace file |
| Extension isolation | Yes — each profile has its own set of extensions | No — all extensions are available globally |
| Settings persistence | Persists across VS Code restarts | Persists only when the workspace file is saved |
| Copilot configuration | Per profile — enable or disable Copilot per contribution workflow | Per workspace — Copilot settings apply to all files in that workspace |
| Ideal for | Multiple open source projects with different extensions and coding styles | Single project with consistent settings across team members |
Settings Profiles offer better isolation for open source contributors who switch between projects frequently. Workspace settings are simpler for teams that maintain a single repository with shared configuration files.
Advanced Tip: Automate Profile Switching With VS Code Tasks
You can automate profile switching by creating a VS Code task in the project’s .vscode/tasks.json file. Add a task that runs the command workbench.action.switchProfile with the profile name as an argument. Bind the task to a keyboard shortcut like Ctrl+Shift+1 for your first open source profile. This lets you switch profiles without opening the command palette.
Now you can use GitHub Copilot in VS Code with Settings Profiles for each open source contribution. Create a profile per project, enable Copilot only where needed, and add project-specific rules to keep suggestions relevant. Try the Copilot inline suggest mode set to onDemand to reduce distractions while still getting AI help when you press Ctrl+Space.