This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Support for Snippet prefix and other values inside Snippet's body #270
Open
Description
I am trying to develop a snippet in which i can use in the body, the snippets prefix, description and/or other values.
For example:
"Snippet x": {
"prefix": "<my-snippet-prefix>",
"description": "A prototype of a snippet",
"types": "html",
"inputs": ["input1", "input2"],
"outputs": ["output1", "output2"],
"body": [
"<@prefix>",
"\t${1|@inputs|}",
"\t${2|@outputs|}",
"$3",
"</@prefix>$0"
]
}
The point is basically to be able to define values like inputs and outputs (e.g. read from a .txt file and writen on the .json file) instead of writting it all down like:
"prefix": "<my-snippet-prefix>",
"description": "A prototype of a snippet",
"types": "html",
"body": [
"<my-snippet-prefix>",
"\t${1|'input1', 'input2'|}",
"\t${2|'output1', 'output2'|}",
"$3",
"</my-snippet-prefix>$0"
]
I don't think this is supported yet, nor the ability to press Ctrl+Space in the code and, within the selected snipped, be able to choose its parameters/values. Is it something doable or am I just missing something?
Metadata
Metadata
Assignees
Labels
No labels