Learn how to disable the autocompletion and intellisense features of VS Code

Why the hell should someone disable the autocompletion from a code editor? Indeed, not any normal developer would like to disable such an useful feature, that's why we use code editors and not plain text editors. However most of the developers aren't normal and we are always innovating and testing new things. If you are looking for how to achieve this, you may be working in something awesome (probably).

A couple of days ago I was working on some coding videos and i noticed that i make a lot of mistakes while typing. I hate when i find coding videos where the typer writes something and then he says oops, that's wrong and modifies the code again (after you have already copied all the code). To prevent this on future Our Code World videos, I developed a little utility in C# that allows you to type the text from a textbox (or richtextbox) simulating all keyboard events (something like an Automatic Typer). Well, but what does this have to do with this tutorial? Nothing, it's only an explanation about why would someone need to disable autocompletion. When the Automatic Typer writes code in VS Code, it autocompletes the code e.g writing { will automatically write {}. Which obviously would add unnecesary logic to my utility to solve the problem, therefore i decided to disable the autocompletion and intellisense on Visual Studio which is pretty easier.

Disable autocompletion and intellisense

The first you need to do is to access the settings file of VS Code.  You can access this file by using the keyboard combination CTRL + , or navigate to File, Preferences and then Settings. This will open the settings.json file of VSCode and you will need to add the following options:

{
    // OPTIONAL WORD WRAPPING
    // Controls if lines should wrap. The lines will wrap at min(editor.wrappingColumn, viewportWidthInColumns).
    "editor.wordWrap": "off",
    
    // Controls the indentation of wrapped lines. Can be one of 'none', 'same' or 'indent'.
    "editor.wrappingIndent": "none",

    // TURN OFF AUTOCOMPLETION
    // Controls if quick suggestions should show up or not while typing
    "editor.quickSuggestions": false,

    // Controls the delay in ms after which quick suggestions will show up
    "editor.quickSuggestionsDelay": 90,

    // Enables parameter hints
    "editor.parameterHints": false,

    // Controls if the editor should automatically close brackets after opening them
    "editor.autoClosingBrackets": false,

    // Controls if the editor should automatically format the line after typing
    "editor.formatOnType": false,

    // Controls if suggestions should automatically show up when typing trigger characters
    "editor.suggestOnTriggerCharacters": false,

    // Controls if suggestions should be accepted 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions.
    "editor.acceptSuggestionOnEnter": "off"
}

If you are working with HTML, the autocomplete may still add snippets and autocomplete the nodes e.g <div></div>. To disable this behaviour add as well:

{
    "html.autoClosingTags": false,
    "html.format.enable": false,
    "html.validate.scripts": false,
    "html.suggest.html5": false,
    "html.format.extraLiners": ""
}

Happy coding !


Senior Software Engineer at Software Medico. Interested in programming since he was 14 years old, Carlos is a self-taught programmer and founder and author of most of the articles at Our Code World.

Sponsors