Skip to main content

Enabling VS Code intellisense in snippets

A setting to rescue

Dec 2021


I use snippets in VS Code, and one thing that has bothered me is that Intellisense (autocomplete) doesn't seem to work within snippets. Here's a snippet I use to create new variables with three.js:

{
  "New ThreeJS variable": {
    "prefix": "nt",
    "body": ["const $1 = new THREE.$2"]
  }
}

In the second cursor position ($2), I'd like to have VS Code's Intellisense popup when I start typing, but that doesn't happen. Fortunately, there's a setting to change this behavior. The setting is called editor.suggest.snippetsPreventQuickSuggestions, and its default value is true. Setting that to false will make Intellisense work within snippets. That's it.