How to create per workspace snippets in VSCode?

Project Level Snippets were added in the September 2018 Release of VSCode (version 1.28):

Snippets can now be scoped to a project and shared with your team. Use the Preferences: Configure User Snippets command or create *.code-snippets file in the .vscode folder.

Project snippets work just like other snippets, they show up in IntelliSense and in the Insert Snippet action where they now have their own category.

Project Level Snippet

Snippets also now support multiple prefixes. If you cannot decide if your copyright header snippet should be prefixed as header, stub, or copyright, you can have them all. Use a string array as the prefix property.

{
  "prefix": ["header", "stub", "copyright"],
  "body": "Copyright. Foo Corp 2028",
  "description": "Adds copyright...",
  "scope": "javascript,typescript"
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)