Prevent autocomplete in Visual Studio Code
Visual Studio-CodeVscode SettingsVisual Studio-Code Problem Overview
I'm using the new Visual Studio Code, which is clearly not ready for prime time yet, but I'm hoping to resolve a problem I'm having.
In a SQL file, any time you type case, it automatically adds end
, as if you were building a case
block. Even if you're in a comment, or using Case
as part of a word (for example, select CaseID from...
).
I'd like to disable all of that nonsense completely, since it doesn't do a good job of auto completing things for me.
The only configuration options I can find, I've already set:
"editor.autoClosingBrackets": false,
"editor.suggestOnTriggerCharacters": false,
What else can I do to stop this?
It is also true for things like begin (it adds end
), and I'm sure lots more.
Visual Studio-Code Solutions
Solution 1 - Visual Studio-Code
In the most recent version of Visual Studio Code I've found out that the
"editor.acceptSuggestionOnCommitCharacter": false
configuration disables this behavior.
Solution 2 - Visual Studio-Code
By 2016, Visual Studio Code is pretty cool and ready for prime time. But I still haven't found a way to simply turn off autocompletion completely.
But they do have some things in their documentation: Customizing IntelliSense
Basically, I put this in my settings.json
to try and turn it off for the workspace. But I still have to evaluate this.
// Place your settings in this file to overwrite default and user settings.
{
// Controls if quick suggestions should show up while typing
"editor.quickSuggestions": { "other": false, "comments": false, "strings": false },
// Controls if suggestions should be accepted with "Enter" - in addition to "Tab". Helps to avoid ambiguity between inserting new lines and accepting suggestions.
"editor.acceptSuggestionOnEnter": "off",
// Controls the delay in ms after which quick suggestions will show up.
"editor.quickSuggestionsDelay": 10,
// Enable word based suggestions
"editor.wordBasedSuggestions": false
}
Solution 3 - Visual Studio-Code
This works for me as of 2019-May-17.
"editor.acceptSuggestionOnCommitCharacter": false,
"editor.acceptSuggestionOnEnter": "off",
"editor.hover.enabled": false,
"editor.minimap.enabled": false,
"editor.parameterHints.enabled": false,
"editor.quickSuggestions": false,
"editor.quickSuggestionsDelay": 10,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestOnTriggerCharacters": false,
"editor.wordBasedSuggestions": false,
Solution 4 - Visual Studio-Code
This isn't the correct answer, but it might be an even better option. Increase:
Editor: Quick Suggestions Delay
from 50 ms (default) to 500-1000 ms.
In this case, you'll have half a second to beat the autocomplete option, which may be enough for 95% of the time, and you won't lose the functionality that you might want in some cases.
Solution 5 - Visual Studio-Code
In the current version of Visual Studio Code, add this to your user settings:
"editor.quickSuggestions.other": false
This disables most of the spurious suggestions.
Solution 6 - Visual Studio-Code
Disable "Visual Studio IntelliCode" extension while working on SQL files. This might be a better option than changing settings that are useful for other files.
Solution 7 - Visual Studio-Code
Here is up to date solution:
"editor.suggest.showClasses": false,
"editor.suggest.showColors": false,
"editor.suggest.showConstants": false,
"editor.suggest.showConstructors": false,
"editor.suggest.showCustomcolors": false,
"editor.suggest.showDeprecated": false,
"editor.suggest.showEnumMembers": false,
"editor.suggest.showEnums": false,
"editor.suggest.showEvents": false,
"editor.suggest.showFields": false,
"editor.suggest.showFiles": false,
"editor.suggest.showFolders": false,
"editor.suggest.showFunctions": false,
"editor.suggest.showInterfaces": false,
"editor.suggest.showIssues": false,
"editor.suggest.showKeywords": false,
"editor.suggest.showMethods": false,
"editor.suggest.showModules": false,
"editor.suggest.showOperators": false,
"editor.suggest.showProperties": false,
"editor.suggest.showReferences": false,
"editor.suggest.showSnippets": false,
"editor.suggest.showStructs": false,
"editor.suggest.showTypeParameters": false,
"editor.suggest.showVariables": false,
"editor.suggest.showValues": false,
"editor.suggest.showWords": false,
"editor.suggest.showUsers": false,
"editor.suggest.showUnits": false,
// controls bracket auto closing
"editor.autoClosingBrackets": "never",
// controls specific languages tag auto closing
"html.autoClosingTags": false,
"javascript.autoClosingTags": false,
"typescript.autoClosingTags": false