I am trying to create some vs code snippets for aura and LWC(Salesforce specific languages) so I created one snippet file for javascript now it works in both the languages but is there a way I can restrict JS and html snippets to LWC only or also can someone please confirm how to create snippets for .cmp and .app files to be used on aura HTML, below is my js snippet which works in all sorts of js files and I and trying to restrict it to just lwc
"Print to console": {
"scope": "javascript",
"prefix": "gss",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
I tried using when
"when": "editorTextFocus && !editorReadonly && resourceExtname =~ /\\.cmp/"
But it says
Property when is not allowed.