apieceofbart
apieceofbart

Reputation: 2197

How to turn off Typescript Language Basics suggestions in Visual Studio Code?

I find Typescript Language Basics suggestions annoying - they always come on top of my suggestion and I would like to turn them off. Does anyone know how to do that?

Upvotes: 9

Views: 1715

Answers (8)

snnsnn
snnsnn

Reputation: 13698

You don't need any workarounds, there is a built-in way to disable a built-in snippet.

  1. Open a file that has the same file type as the one you would like to disable a built-in snippet to. This step is required because available snippets are listed based on file type.
  2. Bring up the command palette by pressing Ctrl+Shift+P or by clicking view > Command Palette on the application menu.
  3. Execute "Insert Snippet" command
  4. You can scroll down to locate the snippet you would like to disable, or use the search box.
  5. Hover over the item and you will see "Hide from Intellisense" icon
  6. Click on the icon.

Disable a built-in snippet

Currently you can not disable user-defined snippets, snippets you have added yourself. You have to remove or comment out them in your related snippets file.

Upvotes: 3

mishns
mishns

Reputation: 1

This extension is up to disable built-in snippets. https://marketplace.visualstudio.com/items?itemName=svipas.control-snippets

Upvotes: 0

Tejas Throat
Tejas Throat

Reputation: 11

 "typescript.format.enable" : false,

https://code.visualstudio.com/docs/languages/typescript#_formatting

Upvotes: 0

Brandon
Brandon

Reputation: 55

I finally found the file. On my Mac, the snippets file was located at /System/Volumes/Data/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/typescript-basics/snippets/typescript.code-snippets. Deleting that file did it for me.

All VS Code snippet files have the .code-snippets extension, so you can just do a file search for that extension and get rid of any ones you don't like!

Upvotes: 2

Mechanic
Mechanic

Reputation: 5380

I couldn't disable it but with this setting you can make appear below useful suggestions:

"editor.snippetSuggestions": "bottom"

enter image description here


before changing settings suggestions: enter image description here

after changing settings suggestions: enter image description here

Upvotes: 5

Fellow Stranger
Fellow Stranger

Reputation: 34103

As of November 2019, adding this to settings.json disabled it for me:

  "editor.suggest.showSnippets": false,

Upvotes: 2

Shota Fuji
Shota Fuji

Reputation: 1

You can turn off snippet suggestions by setting "editor.suggest.filteredTypes": { "snippet": false }

Upvotes: 0

apieceofbart
apieceofbart

Reputation: 2197

So, I found a way to move them to bottom with "editor.snippetSuggestions": "bottom". I don't know why isn't this default.

Upvotes: 2

Related Questions