154

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.

5
  • Exactly, copilot seems no longer to work. Commented Jul 12, 2022 at 12:03
  • 1
    In case you came here looking for how to turn it off in Visual Studio 2022, there's a sub menu inside Edit which turns it on and off. Commented Oct 29, 2023 at 7:51
  • should be on Super User... Commented Jun 3 at 0:48
  • I was looking for the same and here is what worked for me. I wanted to practice something on VS code and the autosuggestions were not helpful there for me. You can place this code under workspace settings.json or user settings.json. { "github.copilot.enable": { "*": false } } Commented Aug 22 at 13:43
  • As of November 2025, the Ghost text feature has been aliased as Next Edit Suggestions(NES). This feature can be toggled from the chat status bar on the bottom right in VS code named as Inline Suggestions. It has 2 options by default All Files and Next Edit Suggestions. By disabling the All files option, the ghost text(NES) feature was disabled for me. Hope it helps. Cheers! Commented Nov 19 at 8:17

10 Answers 10

144

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.)

VSCode settings for inline suggestions

Sign up to request clarification or add additional context in comments.

13 Comments

Did you miss other suggestions in the end, or is this solution still working? I am trying out copilot, but like you I cannot take the continuous dumping of BS in my code
Well, my company pays for copilot, so I can turn it back on. Sadly, I can't get a nice UX without switching inlineSuggest on and off. When it's on, it suggestions show up too often and conflict with intellisense / completion. When it's off, it's hard to trigger and I can't get it to accept (tab doesn't accept copilot suggestions, only intellisense.) I want both, but usually intellisense, and copilot only upon `ALT-` request
While this solution still works, there is a new propper setting (since April 23) that fixes this: "github.copilot.editor.enableAutoCompletions": false
github.copilot.editor.enableAutoCompletions is deprecated
@Shikyo use github.copilot.enable instead
|
26

For Jetbrains IDE (e.g. Webstorm).

You can uncheck automatically show completions in the IDE's settings (Settings > Languages & Frameworks > GitHub Copilot). enter image description here

and then still TRIGGER completion with a keystroke Alt+\ or any keymap you are comfortable with (Settings > Keymap > "Copilot" in the search bar): enter image description here

1 Comment

Is there a way to do this in Visual Studio 2022?
26

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 enter image description here

Then trigger copilot suggestions with the keyboard shorcut you assigned to the command editor.action.inlineSuggest.trigger. enter image description here

4 Comments

@jeff-ward's solution seems to still work in VS Code for me. Disabled editor.inlineSuggest.enabled and I can trigger inline suggestion by keyboard shortcut if desired
github.copilot.editor.enableAutoCompletions is deprecated
@tinker what replaced it?
This answer worked for me, stackoverflow.com/a/79615978/1807877
15

As of May 2025, github.copilot.editor.enableAutoCompletions has been deprecated, instead use github.copilot.enable:

 "github.copilot.enable": {
     "*": false
 }

Docs

1 Comment

this works, thanks a lot!
9

UPDATE 2025

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

Old Post - DEPRACTED -> EXTENSION IS UPDATED THOUGH

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!

6 Comments

This is fantastic. Thanks for taking the time to explain it and make an extension for it. It happens to be exactly what I've been looking for for weeks
Just installed the Bubulus.copilot-inline-toggle extension, does one thing and does it well. A relief. An overly eager copilot has an additional environmental footprint while degrading the UX.
github.copilot.editor.enableAutoCompletions is deprecated
Yeah, I was wondering why my thing didnt work any longer, thx for the info, will patch up the extension soon.
I'll gladly wait for the update @Bubulux, let me know if I can provide any information/help!
|
4

Update as of 2025-6-13, this is the only setting that worked,


                "github.copilot.enable": {
                    "*": false
                },

reference

This prevents the hints from showing up while you type by default. But you can still access them on demand using alt+\ default shortcut. Then, you can press tab to accept the completion. This makes the hints less in your face.

Optionally, if you want to easily toggle the above setup using a keyboard shortcut, use Settings Cycler extension.

add this in settings.json,

"settings.cycle": [
    {
        "id": "copilotHint",
        "overrideWorkspaceSettings": false,
        "values": [
            {
                "github.copilot.enable": {
                    "*": false
                },
            },
            {
                "github.copilot.enable": {
                    "*": true
                },
            }
        ]
    }
],

Set a keyboard shortcut through the GUI,

enter image description here

Or directly copy this into keybindings.json,


    {
        "key": "ctrl+alt+\\",
        "command": "settings.cycle.copilotHint"
    }

Comments

2

As of May 2024, to simply toggle the Copilot suggestions on and off, go to "Settings" > "Keyboard Shortcuts" ("⌘K + ⌘S). Search for "copilot toggle" (github.copilot.completions.toggle). Hover over that row. Click the "+" that displays on the far left. Then type in your preferred keyboard shortcut.

I use ⌘A + ⌘I as my shortcut.

1 Comment

github.copilot.completions.toggle deprecated
0

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

enter image description here

enter image description here

p.s. was doing that for supermaven

Copilot is active. Please disable its inline completions to avoid conflicts with Supermaven.

1 Comment

github.copilot.editor.enableAutoCompletions is deprecated
0

The suggested setting of github.copilot.inlineSuggest.enable seems ineffective, as per the comment in the default settings.json

// This setting has no effect. Please use github.copilot.enable instead.
// Show inline suggestions
"github.copilot.inlineSuggest.enable": true,

Instead, what worked for me was this -
- open user settings: Ctrl + Shift + P, type "settings.json", select Open User Settings (JSON)
- add

{
    "github.copilot.enable": {
        "*": true,
        "<your language>": false
    },
}

Comments

-1

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

1 Comment

this does not affect inline hints suggestions. It's a different setting. Though equally annoying, so I have it disabled as well.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.