-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add snippets as a language (#185017)
* Add snippets as a language * Snippets -> Code Snippets * Add tests * json.snippets -> json.comments.snippets
- Loading branch information
Showing
7 changed files
with
11,002 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7,463 changes: 7,463 additions & 0 deletions
7,463
extensions/json/syntaxes/snippets.tmLanguage.json
Large diffs are not rendered by default.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
extensions/vscode-colorize-tests/test/colorize-fixtures/test.code-snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
// Each snippet is defined under a snippet name and has a scope, prefix, body and | ||
// description. The scope defines in watch languages the snippet is applicable. The prefix is what is | ||
// used to trigger the snippet and the body will be expanded and inserted.Possible variables are: | ||
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. | ||
// Placeholders with the same ids are connected. | ||
// Example: | ||
"MSFT Copyright Header": { | ||
"scope": "javascript,typescript,css", | ||
"prefix": [ | ||
"header", | ||
"stub", | ||
"copyright" | ||
], | ||
"body": [ | ||
"/*---------------------------------------------------------------------------------------------", | ||
" * Copyright (c) Microsoft Corporation. All rights reserved.", | ||
" * Licensed under the MIT License. See License.txt in the project root for license information.", | ||
" *--------------------------------------------------------------------------------------------*/", | ||
"", | ||
"$0" | ||
], | ||
"description": "Insert Copyright Statement" | ||
}, | ||
"TS -> Inject Service": { | ||
"scope": "typescript", | ||
"description": "Constructor Injection Pattern", | ||
"prefix": "@inject", | ||
"body": "@$1 private readonly _$2: ${1},$0" | ||
}, | ||
"TS -> Event & Emitter": { | ||
"scope": "typescript", | ||
"prefix": "emitter", | ||
"description": "Add emitter and event properties", | ||
"body": [ | ||
"private readonly _onDid$1 = new Emitter<$2>();", | ||
"readonly onDid$1: Event<$2> = this._onDid$1.event;" | ||
], | ||
} | ||
} |
Oops, something went wrong.