Tomás
Tomás

Reputation: 375

VSC snippets placeholder choices not loading

As the title says, I'm having problems with VSC's snippets placeholder choices as it gets stuck loading and I never get any of the options.

At the moment I'm testing with a really simple snippet:

    "console.log": {
        "scope": "javascript,typescript",
        "prefix": "cl",
        "body": [
            "console.${2|log,table,count,dir,error,info|}(${TM_SELECTED_TEXT:`${1:Here}`});"
        ],
        "description": "Log output to console"
    },

And the previous snippet ends with my second placeholder never showing the options

enter image description here

Any ideas of how to correct this? I already tried changing the followings settings as some post talked about them, but it didn't work:

enter image description here

Upvotes: 1

Views: 752

Answers (1)

Mark
Mark

Reputation: 180659

A known issue, see Github Issue: Code snippet "Choice" feature no longer working

A fix for this will be in next VS Code Insiders. Also, this will be part of a 1.65.x recovery release.

The fix for the choice issue is in v1.65.2 and works for me.


I am not sure what you are trying to accomplish with this part:

${TM_SELECTED_TEXT:`${1:Here}`} 

I don't think ${TM_SELECTED_TEXT:...} is allowed. It seems to just skip over the first tabstop for that reason. What were you trying to accomplish with that part of the snippet?

Upvotes: 2

Related Questions