How to remove IntelliSense suggested snippets introduced by extension (or built-in)

Viewed 1684

Normally, I want to see suggested IntelliSense snippets when typing and this works nicely. However, some extensions I installed introduce a lot of snippets I will never use and they bloat the IntelliSense suggested list.

I found no way so far to remove/disable snippets coming from an extension. Is there a way to do this?

4 Answers

Coming in v1.52 is the ability to disable snippets, see https://github.com/microsoft/vscode/issues/10565#issuecomment-721832613. But you have to do it on a per-snippet basis which could be helpful if you just wanted to disable seeing certain snippets. The snippets won't show in the intellisense suggestions but can still be accessed through the Command Palette/Insert Snippet command.

Which is also where you go to remove them from appearing in the suggestions.

snippet ignore demo

Alright, found a way to do this.

  1. Go to the folder where your extensions are installed for vscode.
  2. Find the folder for extension that adds the snippets (if you are not sure which one does it, peek the snippet in IntelliSense suggest list - the description will have the extension name in parenthesis at the end, some snippets are from built-in extensions).
  3. Rename snippets.json to _snippets.json, or just modify the file to contain only snippets you are interested in.
  4. Disable extension, reload vs code, enable the extension.

There is no direct way to do this in VSCode unless the extension provides you an option to disable the snippets from it. However, I use an extension to manage all the snippet sets that are active in a workspace.

Control Snippets is the extension.

Control Snippets Manager for VSCode

To remove all suggestion use "editor.snippetSuggestions": "none" in the settings.json

Related