Reputation: 3281
I found most of the suggestions/intellisense coming from the C++ extension in VS code useful. But the specfic pop-up for function arguments can be distracting in some cases.
How do I turn it off (without disabling other suggestions/intellisense features)?
Upvotes: 9
Views: 10463
Reputation: 21418
This is part of IntelliSense. You have a few options to rid yourself of the popup if you don't want it:
Press escape when you want to get rid of the popup. Beneficial if you want some things to autocomplete/make suggestions, but other pieces of code you want left alone.
The steps differ between the Visual Studio IDE and Visual Studio Code, and I wanted to provide instructions for both here.
Tools > Options
.Text Editor
in the left pane.IntelliSense
. For C/C++, choose Advanced
and scroll to the IntelliSense
section.Show completion list after a character is typed
to disable it. For C/C++, you will have a few options, such as Disable Auto Updating
, Disable Squiggles
, and Disable #include “Auto Complete
. Set any of these to “True” to turn them off.You can disable autocomplete in VS Code as well, but the instructions differ from the Visual Studio IDE mentioned above. Here are the settings you can set for IntelliSense in your VS Code settings.json
, which includes settings for enabling/disabling certain portions of IntelliSense:
{
// Controls if quick suggestions should show up while typing
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": false
},
// Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.
"editor.acceptSuggestionOnCommitCharacter": true,
// Controls if suggestions should be accepted on 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions. The value 'smart' means only accept a suggestion with Enter when it makes a textual change
"editor.acceptSuggestionOnEnter": "on",
// Controls the delay in ms after which quick suggestions will show up.
"editor.quickSuggestionsDelay": 10,
// Controls if suggestions should automatically show up when typing trigger characters
"editor.suggestOnTriggerCharacters": true,
// Controls if pressing tab inserts the best suggestion and if tab cycles through other suggestions
"editor.tabCompletion": "on",
// Controls whether sorting favours words that appear close to the cursor
"editor.suggest.localityBonus": true,
// Controls how suggestions are pre-selected when showing the suggest list
"editor.suggestSelection": "recentlyUsed",
// Enable word based suggestions
"editor.wordBasedSuggestions": true,
// Enable parameter hints
"editor.parameterHints.enabled": true,
}
If you want to outright disable code completion altogether, just set everything under editor.quickSuggestions
to false
.
To disable only the function argument suggestion, set "editor.parameterHints.enabled": false
in your settings.json
.
Upvotes: 11