Search code examples
visual-studio-codevscode-snippets

how to make user snippets work inside strings: vscode


I've made own user snippet code for javascript

"inner backquote concat variable" : {
    "prefix": "$",
    "body": "\\${$1}",
    "description": "concat variable with backquote sting"
}

I want that snippet to work inside backquote string or single quote string when I press '$' like this

snippetwork.gif

but it does not work when inside a string.

heloquote.gif

How do make the snippet work inside a string?


Solution

  • Add the following snippet in settings.json

    "editor.quickSuggestions": {
            "strings": true
        },
    

    It makes all snippets/emmets working on strings.