You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
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?
The text was updated successfully, but these errors were encountered:
This isn’t supported as a built-in feature of snippets. But you can write a command that collects parameters in whatever manner you please and writes the output as a snippet. Here’s an example of how to insert the result of a command as a snippet.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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:
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:
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?
The text was updated successfully, but these errors were encountered: