如何使用户片段在字符串中工作:vscode

Rid*_*ung 4 visual-studio-code vscode-snippets

我为 javascript 制作了自己的用户片段代码

"inner backquote concat variable" : {
    "prefix": "$",
    "body": "\\${$1}",
    "description": "concat variable with backquote sting"
}
Run Code Online (Sandbox Code Playgroud)

当我像这样按“$”时,我希望该片段在反引号字符串或单引号字符串中工作

片段作品.gif

但在字符串内部时它不起作用。

heloquote.gif

如何使代码片段在字符串中工作?

Rid*_*ung 5

在 settings.json 中添加以下代码段

"editor.quickSuggestions": {
        "strings": true
    },
Run Code Online (Sandbox Code Playgroud)

它使所有片段/emmet 都可以处理字符串。