Skip to content

Commit bfbf088

Browse files
author
AWS Scripting Guy
committed
snippet sample
1 parent 58a02a9 commit bfbf088

File tree

5 files changed

+66
-0
lines changed

5 files changed

+66
-0
lines changed

.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [{
8+
"name": "Run Extension",
9+
"type": "extensionHost",
10+
"request": "launch",
11+
"runtimeExecutable": "${execPath}",
12+
"args": [
13+
"--extensionDevelopmentPath=${workspaceFolder}"
14+
]
15+
}
16+
]
17+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.insertSpaces": false
3+
}

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
11
# dummy-extension
22
Testing integration with Azure Pipelines
3+
4+
## Snippet Sample
5+
6+
This is the source code for [Snippet Guide](https://vscode-ext-docs.azurewebsites.net/api/language-extensions/snippet-guide).
7+
8+
## VS Code API
9+
10+
### Contribution Points
11+
12+
- [`contributes.snippets`](https://vscode-ext-docs.azurewebsites.net/api/references/contribution-points#contributes.snippets)
13+
14+
## Running the Sample
15+
16+
- Run the `Run Extension` target in the Debug View
17+
- When you type `log` in a JavaScript file, you would see the snippet `Print to console`.

package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "snippet-sample",
3+
"displayName": "Snippet Sample",
4+
"description": "Snippet Sample",
5+
"version": "0.0.1",
6+
"publisher": "vscode-samples",
7+
"engines": {
8+
"vscode": "^1.28.0"
9+
},
10+
"categories": [
11+
"Snippets"
12+
],
13+
"contributes": {
14+
"snippets": [
15+
{
16+
"language": "javascript",
17+
"path": "./snippets.json"
18+
}
19+
]
20+
}
21+
}

snippets.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"Print to console": {
3+
"prefix": "log",
4+
"body": [
5+
"console.log('$1');",
6+
"$2"
7+
],
8+
"description": "Log output to console"
9+
}
10+
}

0 commit comments

Comments
 (0)