When you use GitHub Copilot in Visual Studio Code, the default suggestion style may not match your preferred workflow. You might want inline suggestions that appear as ghost text, or you might prefer a separate pane that lists multiple completions at once. The setting that controls this behavior is called the suggestion style, and it is easy to change. This article explains how to locate and pin the GitHub Copilot suggestion style setting in VS Code so it always uses your chosen format.
Key Takeaways: Pin GitHub Copilot Suggestion Style
- VS Code settings.json > github.copilot.editor.enableAutoCompletions: Controls whether inline ghost-text suggestions appear automatically as you type.
- VS Code settings.json > github.copilot.inlineSuggest.enable: When set to false, Copilot shows suggestions in a separate list instead of inline ghost text.
- Ctrl+Shift+P > Preferences: Open Settings (JSON): Quick command to access the raw JSON settings file where you can pin the suggestion style.
What the Suggestion Style Setting Controls
GitHub Copilot in VS Code offers two main suggestion styles. The default style is inline ghost text. When you are typing code, Copilot shows a dimmed completion directly in the editor at the cursor position. You accept it by pressing Tab. The alternative style shows suggestions in a separate completion list that appears below the current line. This list behaves like the standard IntelliSense list in VS Code. You scroll through it and press Enter or Tab to insert the selected completion.
The key settings that control this behavior live in the VS Code settings.json file. The setting github.copilot.editor.enableAutoCompletions turns inline ghost text on or off. When it is true, Copilot automatically shows ghost text. When it is false, Copilot does not show inline suggestions, but you can still trigger suggestions manually with Ctrl+Space. The setting github.copilot.inlineSuggest.enable works alongside it. When inline ghost text is off, Copilot falls back to the list-based suggestion style.
Pinning the suggestion style means setting these values to your preference and locking them so they do not change when you switch workspaces or update VS Code. You can do this in either the user-level settings.json or the workspace-level settings.json. The user-level file applies to all projects. The workspace-level file applies only to the current project folder.
Steps to Pin the Suggestion Style in VS Code Settings
Follow these steps to set the GitHub Copilot suggestion style and save it permanently.
- Open the VS Code Settings Editor
Press Ctrl+, to open the Settings tab. Alternatively, click File > Preferences > Settings. The Settings editor opens with a search bar at the top. - Search for the Copilot suggestion style setting
In the search bar, typegithub.copilot.editor.enableAutoCompletions. The results show a toggle switch for this setting. If the toggle is blue, inline ghost text is enabled. If it is gray, inline ghost text is disabled. - Set the enableAutoCompletions toggle to your preference
Turn the toggle on to enable inline ghost text. Turn it off to disable inline ghost text. When you disable it, Copilot will show suggestions in the completion list instead. - Open the settings.json file directly
Press Ctrl+Shift+P to open the Command Palette. TypePreferences: Open Settings (JSON)and press Enter. The settings.json file opens. This file contains all your custom settings in JSON format. - Add or update the Copilot suggestion style settings
Locate thegithub.copilot.editor.enableAutoCompletionskey. If it does not exist, add it. Enter the value astrueorfalsebased on your preference. Also add thegithub.copilot.inlineSuggest.enablekey with the opposite boolean value. For example, to use the completion list style, set both tofalse. To use inline ghost text, set both totrue. The JSON should look like this:"github.copilot.editor.enableAutoCompletions": false,
"github.copilot.inlineSuggest.enable": false - Save the settings.json file
Press Ctrl+S to save the file. VS Code reloads the settings immediately. You do not need to restart the editor. - Test the new suggestion style
Open a code file and start typing. If you set inline ghost text to false, you will not see ghost text. Press Ctrl+Space to manually trigger the completion list. The list shows Copilot suggestions along with other IntelliSense completions.
Common Mistakes When Pinning the Suggestion Style
Copilot still shows inline suggestions after I disabled them
This happens when you have two conflicting settings. The github.copilot.editor.enableAutoCompletions setting may be false, but a workspace-level settings.json file overrides it with true. Check both the user-level and workspace-level settings.json files. The workspace file takes priority. Open the workspace-level file by clicking File > Open Folder and then opening the .vscode folder in your project root. Look for settings.json inside that folder.
The suggestion list does not appear when I press Ctrl+Space
This can occur if the github.copilot.inlineSuggest.enable setting is set to true even after you disabled auto completions. When inlineSuggest.enable is true, Copilot tries to show inline ghost text, but because auto completions are off, nothing appears. Set github.copilot.inlineSuggest.enable to false to force the list-based style. Also verify that the VS Code IntelliSense feature is not disabled. Check the setting editor.suggest.showMethods and related suggest settings.
My settings reset after a VS Code update
VS Code updates do not modify your user settings.json file. If settings appear to reset, you may have a corrupted settings file or a conflicting extension. Extensions such as Copilot Nightly or Copilot Chat can override the suggestion style. Disable any Copilot-related extensions except the official GitHub Copilot extension. Then reapply the settings in settings.json. Also check the VS Code logs for errors. Open the Developer Tools with Help > Toggle Developer Tools and look for errors in the Console tab.
Copilot Inline Ghost Text vs Completion List Style: Key Differences
| Item | Inline Ghost Text | Completion List |
|---|---|---|
| Description | Suggestions appear as dimmed text at the cursor position | Suggestions appear in a dropdown list below the current line |
| Activation | Automatic, no key press needed | Requires manual trigger with Ctrl+Space |
| Key to accept | Tab | Enter or Tab |
| Key to dismiss | Escape | Escape |
| Multiple suggestions | Cycles through suggestions with Alt+] and Alt+[ | Scroll through list with Arrow keys |
| Workspace-level override | Possible via workspace settings.json | Possible via workspace settings.json |
You can now set the GitHub Copilot suggestion style to either inline ghost text or the completion list using the VS Code settings.json file. The key settings are github.copilot.editor.enableAutoCompletions and github.copilot.inlineSuggest.enable. Save the file and test the change by typing in a code file. If you work in multiple projects, check each workspace-level settings.json file for conflicts. For a more advanced setup, you can bind a keyboard shortcut to toggle between the two styles by editing the keybindings.json file with a custom command.