pawelgrzybek / snippet-generator

Snippet generator for Visual Studio Code, Sublime Text and Atom
https://snippet-generator.app/
1.74k stars 202 forks source link

Add scope #26

Closed linonetwo closed 5 years ago

linonetwo commented 5 years ago

"scope": "javascript,javascriptreact,typescript,typescriptreact", So snippet work cross ts tsx and js jsx.

pawelgrzybek commented 5 years ago

Hi.

Majority of the snippets created by users are added to language specific snippets JSON file. Scope is not needed in this case. If someone creates a global snippets it is very easy to add scope manually. I may reconsider to change a base template of a VS Code snippet to:

"": {
  "prefix": "",
  "body": [
    ""
  ],
  "description": "",
  "scope": ""
}

Thanks for suggestion.

wenfangdu commented 3 years ago

If you're using VSCode, you can try this extension, it supports optional scope.