Reputation: 18986
I find Github Copilot very helpful in some specific situations, but fairly unhelpful in its verbosity in most situations.
By default, it's always on, always suggesting (and frequently getting in my way.) I want it to be less aggressive, disabling the auto-suggestion, but still have it readily available at a keystroke.
What I've tried already:
In a helpful post, I see that Alt\ is the default key for triggering Copilot suggestions. Great, that's half of the solution.
In settings.json
, setting the following seems to disable copilot entirely! It is no longer available using the keyboard shortcut.
"github.copilot.inlineSuggest.enable": false
I wonder if that's a bug, because there's already multiple ways to disable copilot entirely.
Upvotes: 93
Views: 45199
Reputation: 8584
another option (potentially simpler) is to open GitHub Copilot chat window and do:
@vscode Disable Completions
another option (more convenient UI) is by:
@vscode open vscode-insiders://settings/github.copilot.editor.enableAutoCompletions
p.s. was doing that for supermaven
Copilot is active. Please disable its inline completions to avoid conflicts with Supermaven.
Upvotes: 0
Reputation: 426
what worked for me was to disable the annoying stars on the left handside that are jumping up and down
"github.copilot.editor.enableCodeActions": false
Upvotes: 0
Reputation: 341
As of May 2024, to simply toggle the Copilot suggestions on and off, go to "Settings" > "Keyboard Shortcuts" ("⌘K + ⌘S). Search for "toggleCopilot" (github.copilot.toggleCopilot). Hover over that row. Click the "+" that displays on the far left. Then type in your preferred keyboard shortcut.
Upvotes: 2
Reputation: 1
The below image is from Pycharm. It seems to do the trick for me. enter image description here
Upvotes: -2
Reputation: 165
I've made this extension in VS Code, which makes this whole process much easier: https://marketplace.visualstudio.com/items?itemName=Bubulus.copilot-inline-toggle
For anyone who just needs to temporarily disable the inline suggestion that overrides intellisense --> a convenient solution that worked for me, was toggling this setting:
"github.copilot.editor.enableAutoCompletions"
When true, Copilot will work as expected, and give you his inline greyed-out suggestions that can be accepted with tab.
When false, Copilot will still work, but the inline suggestions and autocomplete on tab will be disabled. Thus if you are seeking to temporarily only go for intellisense autocompletion, then this does the trick well.
For toggling, I choose the Settings Cycler VS Code extension.
To configure this, you need to add the toggle behavior with a corresponding unique id
to your settings.json file. For example, I have this config:
"settings.cycle": [
{
"id": "copilotInline",
"overrideWorkspaceSettings": false,
"values": [
{
"github.copilot.editor.enableAutoCompletions": true
},
{
"github.copilot.editor.enableAutoCompletions": false
}
]
}
],
Then to toggle between those two provided values, just add a preferred keybinding to the command by citing the chosen id like this in the keybindings.json file:
{
"key": "ctrl+oem_3",
"command": "settings.cycle.copilotInline"
}
In my case on ctrl + ö
I toggle between those states now!
Upvotes: 7
Reputation: 221
The top rated solution does not seem to work anymore. However the above solution by @BiasInput also works in VSCode.
Open user settings.json and set "github.copilot.editor.enableAutoCompletions": false
Then trigger copilot suggestions with the keyboard shorcut you assigned to the command editor.action.inlineSuggest.trigger
.
Upvotes: 18
Reputation: 18986
In settings.json
(under File, Preferences, Settings), I found that setting the more general option:
"editor.inlineSuggest.enabled": false,
Seems to work as I'd hoped. Copilot suggestions are now only provided on-demand, when I press Alt\, and accepted when I press Tab
I worry that this might disable other types of suggestions I rely on... but language auto-completion still seems to work. I'll update this answer if I find anything I miss.
BTW, changing the keyboard shortcuts:
Under File, Preferences, Keyboard Shortcuts, if you search for inlinesuggest
, you see the keystrokes for both triggering inline suggestion and for committing (aka, accepting) inline suggestions. Double-click the row to change the key (but watch out for conflicts.)
Upvotes: 80
Reputation: 861
For Jetbrains IDE (e.g. Webstorm).
You can uncheck automatically show completions
in the IDE's settings (Settings > Languages & Frameworks > GitHub Copilot).
and then still TRIGGER completion with a keystroke Alt+\
or any keymap you are comfortable with (Settings > Keymap > "Copilot" in the search bar):
Upvotes: 22