How to disable IntelliSense in VS Code for Markdown?
Asked Answered
I

4

72

I don't want word completion for Markdown files in Visual Studio Code, how do I disable it? Ideally, for Markdown only but in the worst case, even a global switch would be good.

Infidelity answered 8/8, 2016 at 15:9 Comment(0)
F
126

IntelliSense suggestions in VS Code can be configured globally or per each workspace and as of 1.9 per file-type (language), using the editor.quickSuggestions, editor.acceptSuggestionOnEnter and editor.suggestOnTriggerCharacters settings.

// Controls if quick suggestions should show up or not while typing
"editor.quickSuggestions": true,

Since VSCode 1.11, the quickSuggestions setting allows more fine-grained control over quick suggestions. However, this setting accepts either a boolean, or an object matching IQuickSuggestionsOptions, and defaults to true. Setting it to false disables quick suggestions all together.

File-type settings (preferred, as of 1.9 release)

Open the Command Palette by pressing F1 and run the Configure language specific settings command, then select Markdown. A new editor pane will open where you can place those settings:

// Place your settings in this file to overwrite the default settings
{
  "[markdown]": {
    "editor.quickSuggestions": false
  }
}

This way, you'll disable IntelliSense for markdown files only.

Global

Open Command Palette by pressing F1, type open user settings and press Enter. A new editor pane will open where you can place those settings:

// Place your settings in this file to overwrite the default settings
{
    "editor.quickSuggestions": false
}

Workspace

Workspace settings allows setting custom settings without applying them to your other VS Code projects. The workspace settings file is located under the .vscode folder in your project.

Open Command Palette by pressing F1, type open workspace settings and press Enter. A new editor pane will open when you can place the same snipped as listed above.

I don't know if it's currently possible to associate settings with selected filetypes.

Other options to configure

In addition to editor.quickSuggestions several other options can be changed to further customize how IntelliSense works:

// Controls if quick suggestions should show up while typing
"editor.quickSuggestions": 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": false,

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

// Enable word based suggestions
"editor.wordBasedSuggestions": false,

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

// Controls if suggestions should automatically show up when typing trigger characters
"editor.suggestOnTriggerCharacters": false
Forgotten answered 11/8, 2016 at 10:37 Comment(8)
sadly, plain text .txt isn't deemed a language, to explicitly turn off autocomplete for...Medievalism
for those looking to disable intellisense for .txt files like I was, this worked for me: "[plaintext]": { "editor.quickSuggestions": false }Pirouette
Thanks for the answer. Was looking exactly for this. auto suggestions were so annoying and disturbing in markdown.Stowe
editor.wordBasedSuggestions is the one you'll want to turn off if you still want access to your Markdown extension intellisense but not have it cluttered by random words.Georgeannageorgeanne
@Frank Nocke's comment is (now?) wrong, for .txt the type is Plain Text, see @MrDustpan's comment, thank you! You can do: [Ctl-Shift-P] / Configure Language Specific Settings... / [Enter] / Plain Text / [Enter] / "editor.quickSuggestions": false / [Ctl-S]Sherris
If you're trying to do this with .mdx files, beware that you will have to use "[mdx]" instead of "[markdown]".Metaphase
@FrankNocke Plain text is a language, it's called PlainText and it covers .txt filesPaviour
Not sure when it was introduced, but at least in vsCode 1.74.3 the editor.quickSuggestions option is not a boolean anymore. Rather, it's a hash like "editor.quickSuggestions": { "other": false, "comments": false, "strings": false }Earlap
F
11

In addition to what @JakubS said, there are two more settings that will help eliminate IntelliSense:

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

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

The editor.autoClosingBrackets option will stop Visual Studio Code from automatically inserting a closing parenthesis, bracket, brace, single quote, double quote, etc.

The editor.suggestOnTriggerCharacters option will stop the auto-complete window from appearing when you type a dollar sign or dot.

All together, here's what I use:

// Controls if quick suggestions should show up while typing
"editor.quickSuggestions": 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": false,

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

// Enable word based suggestions
"editor.wordBasedSuggestions": false,

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

// Controls if suggestions should automatically show up when typing trigger characters
"editor.suggestOnTriggerCharacters": false
Fushih answered 25/12, 2016 at 21:42 Comment(1)
I think the trigger characters may be language-specific. The dot is definitely a trigger character in Python and probably most if not all languages. But when I type the dollar sign (in Python), nothing happens, even if I have "editor.suggestOnTriggerCharacters": true.Reconstruction
P
2

This only worked for plaintext, not markdown. My settings.json is as below but I'm still getting suggestions in .md files (though now not in .txt files).

{
    "[markdown]": {
        "editor.quickSuggestions": false
    },
    "[plaintext]": {
        "editor.quickSuggestions": false
    },
    [other entries]
}
Parapsychology answered 14/1, 2022 at 17:33 Comment(0)
P
0

If also the markdown linting warnings are distracting and you want to disable them temporarily, you can use;

CTRL/COMMAND+SHIFT+P
Toggle linting by markdownlint on/off (temporarily)

You can enable it when you believe you're done with a document.

Pretense answered 20/7, 2020 at 10:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.