Skip to content

Commit 2545af5

Browse files
authored
feat: add built-in code snippets (#78)
1 parent 2baac00 commit 2545af5

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

.vscodeignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
.vscode
22
.vscode-test
33
node_modules
4+
__mocks__
45
out/
56
src/
67
scripts/
8+
azure-pipelines/
79
.gitignore
810
package-lock.json
911
tsconfig.json
1012
tslint.json
1113
webpack.config.js
12-
azure-pipelines/
1314
jest.config.js
1415
**/*.map

package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"homepage": "https://github.com/Microsoft/vscode-dtdl/blob/master/README.md",
2222
"categories": [
2323
"Azure",
24-
"Other"
24+
"Snippets"
2525
],
2626
"activationEvents": [
2727
"onCommand:vscode-dtdl.createInterface",
@@ -57,6 +57,12 @@
5757
"scopeName": "text.channel.colorized",
5858
"path": "./syntaxes/colorized.channel.tmLanguage"
5959
}
60+
],
61+
"snippets": [
62+
{
63+
"language": "json",
64+
"path": "./snippets/snippets.json"
65+
}
6066
]
6167
},
6268
"scripts": {

snippets/snippets.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"Add DTDL Property" : {
3+
"prefix": "dtp",
4+
"body" : [
5+
"{\n\t\"@type\": \"Property\",\n\t\"name\": \"$1\",\n\t\"schema\": $2\n}"
6+
],
7+
"description": "Adds a DTDL property"
8+
},
9+
"Add DTDL Telemetry" : {
10+
"prefix": "dtt",
11+
"body" : [
12+
"{\n\t\"@type\": \"Telemetry\",\n\t\"name\": \"$1\",\n\t\"schema\": $2\n}"
13+
],
14+
"description": "Adds a DTDL Telemetry"
15+
},
16+
"Add DTDL Command" : {
17+
"prefix": "dtc",
18+
"body" : [
19+
"{\n\t\"@type\": \"Command\",\n\t\"name\": \"$1\",\n\t\"schema\": $2\n}"
20+
],
21+
"description": "Adds a DTDL Command"
22+
}
23+
}

0 commit comments

Comments
 (0)