Vscode-cpptools: Version 0.10.4 disables editor.quickSuggestions by default

Created on 16 Mar 2017  ·  27Comments  ·  Source: microsoft/vscode-cpptools

I'm using two extension for my C/C++ project

  • "C/C++" provide by microsoft (this one)
  • "C/C++ clang command Adapter" provide by Yasuaki MITANI(the other one)

this one for debug, go-to-define...
and the other one for auto-complete and diagnostic

Since the Auto-Completion feature provide by this extension is not good enough, I must use the other one, and It's work well with setting "C_Cpp.autocomplete:DIsabled" in my config file before update (this extension) to version 0.10.4

When I update, I can still use trigger character(such as '.' '->') to get suggestion list, but the suggestion list will not appear when I type other character(Auto-Complete without trigger), and It's work well with version 0.10.3 and early version(this extension).

I have try to disable this extension, and the other one work well.

So my question is, "Can you fix this problem?" or "How can I re-install the version 0.10.3 of this extension"

Language Service bug fixed (release pending)

Most helpful comment

I just try to change the config in C:/users/{user_name}/.vscode/extensions/ms-vscode.cpptools-0.10.4/package.json [932] and [935] from

configurationDefaults": {
      "[cpp]": {
        "editor.quickSuggestions": false
      },
      "[c]": {
        "editor.quickSuggestions": false
      }
    } 

to

configurationDefaults": {
      "[cpp]": {
        "editor.quickSuggestions": true
      },
      "[c]": {
        "editor.quickSuggestions": true
      }
    } 

and restart VSCode.
It's worked.

seems like vscode's config is covered by externsion's configuration .

All 27 comments

can you try adding "editor.quickSuggestions": true to your settings.json (File -> Preferences -> Settings)and see if that resolves your issue?

In 0.10.4 we disabled the "aggressive" suggestion setting which VS Code sets by default, but you can change it back.

Also, even when this setting is set to false (which the extension does by default now), you can force the suggestion list to appear at any time with the CTL+Space shortcut.

Thank you so much for your reply.
I have try your suggestion:

add "editor.quickSugestions":true to my settings.json (both user setting and workspace settings)

But it's not work for me. issue still there.

And I am not a native speaker of English, In window 10 Ctrl+space is default to switch input methods.
So if I press Ctrl+space, there is not suggestion list but just switch my input methods:sweat_smile:

I just try to change the config in C:/users/{user_name}/.vscode/extensions/ms-vscode.cpptools-0.10.4/package.json [932] and [935] from

configurationDefaults": {
      "[cpp]": {
        "editor.quickSuggestions": false
      },
      "[c]": {
        "editor.quickSuggestions": false
      }
    } 

to

configurationDefaults": {
      "[cpp]": {
        "editor.quickSuggestions": true
      },
      "[c]": {
        "editor.quickSuggestions": true
      }
    } 

and restart VSCode.
It's worked.

seems like vscode's config is covered by externsion's configuration .

i have come cross the same problem. - -|||
thx San0from

thx, i think turning on the 'quick suggestion' is better than turning it off.
by the default condition, i don't know how to get the 'suggestion list'.

发自我的 iPhone

在 2017年3月16日,21:07,Sean McManus notifications@github.com 写道:

Changing your user setting to [cpp]: { "editor.quickSuggestions": true } should fix the issue. You shouldn't need to change the extension's package.json. We added that default setting because our auto-complete doesn't give particularly good results with the setting on (i.e. keywords auto-complete without the keyword being in the list of suggestions).


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Changing your user setting to [cpp]: { "editor.quickSuggestions": true } should fix the issue -- we may be able to automatically set this if our autocomplete setting is false. You shouldn't need to change the extension's package.json. We added that default setting because our auto-complete doesn't currently give particularly good results with the setting on (i.e. keywords auto-complete without the keyword being in the list of suggestions). As soon as we add keywords/snippets to our extension I think we can remove this default setting. Ctrl+Space should be usable and should not map to "switch input method", which should be Win+Space, unless your OS is configured differently. You can also use the Command Prompt >Trigger Suggest.

@sean-mcmanus Thank you for your reply, I'll try this tomorrow.

I am using the win7 OS not the Win10.

发自我的 iPhone

在 2017年3月16日,21:22,Sean McManus notifications@github.com 写道:

Changing your user setting to [cpp]: { "editor.quickSuggestions": true } should fix the issue. You shouldn't need to change the extension's package.json. We added that default setting because our auto-complete doesn't currently give particularly good results with the setting on (i.e. keywords auto-complete without the keyword being in the list of suggestions). As soon as we add keywords/snippets to our extension I think we can remove this default setting. Ctrl+Space should be usable and should not map to "switch input method", which should be Win+Space, unless your OS is configured differently. You can also use the Command Prompt >Trigger Suggest.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

We're investigating a way to make this dynamic based on whether you have set "C_Cpp.autocomplete": Disabled or not.

I'm testing a fix for this, but it might not be out today. In the meantime, you can restore the old behavior by doing what @sean-mcmanus mentioned above.

Here's a screenshot to help you locate the settings for easier copying to your settings.json file. You can find them under the "Default Configuration Overrides" section. Click the pencil icon to copy the settings over, and then change the value to true.
settings

It's works for me:
I have changed the config in package back, add these line to my setting file:

"[cpp]": {
        "editor.quickSuggestions": true
},
"[c]": {
        "editor.quickSuggestions": true
},

Thank your for your job! @bobbrow @sean-mcmanus

And you can do the same thing as me to fix this @JiangCN

We have a fix for this, but it exposes a bug in the VS Code editor. Our fix removes the default settings we added in 0.10.4, and will instead modify your settings.json file to add local overrides to disable the quickSuggestions setting by default if the autocomplete setting is set to "Default".

The bug in VS Code is that if you are actively editing your settings.json file and you change the C_Cpp.autocomplete setting, VS Code does not refresh the file when we make the change to it, so if you continue to edit your settings, VS Code will report a conflict in the file that needs to be merged. The VS Code bug appears to be fixed in the insider build, but we don't know when they will release an update with that fix into the stable build.

@sean-mcmanus filed this issue https://github.com/Microsoft/vscode/issues/22802 and we are waiting for a response before we ship our update.

With 0.10.5, the quickSuggestions setting is now based on the autocomplete setting. Let us know if there are problems with the behavior.

Thank you for your job,
now I can just use "C_Cpp.autocomplete":"Disabled" in my setting file, and It's work well.

right, but in 0.10.5 set the autocomplete Disable ,quick.suggestion doesn't work like before without symbol tips.

发自我的 iPhone

在 2017年3月17日,13:03,San notifications@github.com 写道:

It's works for me:
I have changed the config in package back, add these line to my setting file:

"[cpp]": {
"editor.quickSuggestions": true
},
"[c]": {
"editor.quickSuggestions": true
},
Thank your for your job! @bobbrow @sean-mcmanus

And you can do the same thing as me to fix this @JiangCN


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

today, i also meet this issue, and lucky find this solution! Thanks gus!

@JiangCN can you explain what is not working for you in 0.10.5? What do you expect to happen?

The proposed fix didn't work for me, nor did changing "C_Cpp.intelliSenseEngine" to "Default".

I'm using version 1.1.13 in Arch Linux with Cinnamon.

For example, if I type in a .c file:

int test_var;
test_var = 10;

autocomplete doesn't work in line 2.

What _did_ solve the autocomplete issue for me, was setting "C_Cpp.autocomplete": as "Disabled". However, right click -> Go to definition still doesn't work as well.

We do not implement autocomplete or go to definition for local variables -- only hover and error squiggles will work with local variables (and only when the intelliSenseEngine is Default).

I see. It says:

"Default" provides context-aware results and is in preview mode - hover and error squiggles are currently implemented

Does this means that autocomplete is within the scope of this project, and will be implemented in the future?

I imagine most developers don't enjoy having to re-type locally-defined names around, for various reasons.

Yeah, we are releasing the autocomplete using the Default intelliSenseEngine in our next update, but it will only work after a member operation (i.e. after scoped . | -> | ::) and not local/global variables (the non-scoped case needs more work, but we don't have an ETA yet).

I have tried both "editor.quickSuggestions": true and "C_Cpp.autocomplete": "Disabled" in my settings.json. Is there an update for this sort of problem? My autocomplete seems to work on any other file types other than my .c files (I haven't tried cpp files).

@AustinMoninger Can you change editor.wordBasedSuggestions setting to true? We default it to being disabled because it interferes with C/C++ in general (i.e. completion occurs after "struct name").

@sean-mcmanus That worked like a charm! Thanks. Only thing is that the extension is eating up processing power for some reason and making my fan be loud... I'll look at the other issues for that.

I need editor on remote server, so I've installed c/cpp plugin (yours) and remote containers ssh extension. I've solved problem with autocomplete by combination of solutions above. I've added next lines to settings.json on my computer(locally) and added it to settings.json on remote server:

"editor.wordBasedSuggestions": true,
"[c]":  {
    "editor.wordBasedSuggestions": true
},
"[cpp]":  {
    "editor.wordBasedSuggestions": true
},
"C_Cpp.autocomplete": "Disabled"

Only this fixed my problem. Maybe it'll help to others.

Was this page helpful?
0 / 5 - 0 ratings