3

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?

Mark
  • 143,421
  • 24
  • 428
  • 436
Ev0oD
  • 1,395
  • 16
  • 33

4 Answers4

7

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

Mark
  • 143,421
  • 24
  • 428
  • 436
4

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

Peter Csala
  • 17,736
  • 16
  • 35
  • 75
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 05 '22 at 18:19
3

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

tHeSiD
  • 4,587
  • 4
  • 29
  • 49
  • 1
    This is also a good answer, if you do not want to change the snippets specifically or turn off a subset per extension. Which is what I needed anyway at the moment – Ev0oD Jun 14 '20 at 22:21
  • Quote from the extension's readme: _"If you're in **Windows**, you have to **run VS Code as administrator** to use this extension"_. – Wenfang Du Sep 13 '21 at 23:07
3

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.
Wenfang Du
  • 8,804
  • 9
  • 59
  • 90
Ev0oD
  • 1,395
  • 16
  • 33