@codingame/monaco-editor-wrapper 1.4.3 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/COBOL Copybook2.js +2017 -0
- package/dist/COBOL2.js +2017 -0
- package/dist/JavaScript.tmLanguage.js +0 -49
- package/dist/JavaScriptReact.tmLanguage.js +0 -49
- package/dist/SQL.plist.js +482 -0
- package/dist/TypeScript.tmLanguage.js +0 -49
- package/dist/TypeScriptReact.tmLanguage.js +0 -49
- package/dist/bsv2.js +49 -0
- package/dist/c2.js +18 -0
- package/dist/cobol-snippets.js +2017 -0
- package/dist/codeblock3.js +18 -18
- package/dist/coffeescript-coffeescript.code-snippets.js +18 -0
- package/dist/coffeescript2.js +18 -0
- package/dist/configuration/hack.d.ts +2 -0
- package/dist/cpp-c.code-snippets.js +18 -0
- package/dist/cpp-cpp.code-snippets.js +18 -0
- package/dist/cpp2.js +18 -0
- package/dist/cpptools.js +7 -1
- package/dist/csharp2.js +508 -0
- package/dist/css.worker.js +1 -1
- package/dist/cssContribution.js +10 -0
- package/dist/diet3.js +92 -0
- package/dist/elixir-snippets.js +184 -0
- package/dist/extensionConfigurations.js +9475 -0
- package/dist/features/extensionConfigurations.js +3 -3
- package/dist/fsharp-fsharp.code-snippets.js +18 -0
- package/dist/fsharp2.js +18 -0
- package/dist/groovy-groovy.code-snippets.js +229 -0
- package/dist/groovy2.js +229 -0
- package/dist/hacks.d.ts +2 -1
- package/dist/html (eex).js +31 -0
- package/dist/html.worker.js +1 -1
- package/dist/htmlContribution.js +10 -0
- package/dist/index.d.ts +2 -2
- package/dist/java-java.js +4 -1
- package/dist/java.js +11 -0
- package/dist/java2.js +3 -2
- package/dist/javascript-javascript.code-snippets.js +196 -0
- package/dist/javascript2.js +196 -0
- package/dist/javascriptreact2.js +196 -0
- package/dist/json.worker.js +1 -1
- package/dist/jsonContribution.js +78 -0
- package/dist/keybindings/index.d.ts +2 -1
- package/dist/keybindings/keybindingHelper.d.ts +1 -1
- package/dist/kotlin2.js +117 -0
- package/dist/kotlinscript2.js +117 -0
- package/dist/languages/extensions/configurationLoader.d.ts +1306 -0
- package/dist/languages/extensions/languageConfigurationLoader.d.ts +9 -1
- package/dist/languages/monarch/list.d.ts +7 -0
- package/dist/languages/textMate/CGTMTokenizationSupport.d.ts +2 -2
- package/dist/languages/textMate/TextMateTokensProvider.d.ts +11 -0
- package/dist/lua2.js +35 -0
- package/dist/main.js +186 -232
- package/dist/markdown-basics-markdown.code-snippets.js +121 -0
- package/dist/markdown-basics.js +103 -0
- package/dist/markdown2.js +103 -0
- package/dist/monaco.d.ts +0 -1
- package/dist/pgsql-sql.js +21 -0
- package/dist/pgsql.js +21 -0
- package/dist/php-php.code-snippets.js +265 -0
- package/dist/php2.js +265 -0
- package/dist/powershell-powershell.code-snippets.js +18 -0
- package/dist/powershell2.js +18 -0
- package/dist/r.tmLanguage.js +572 -0
- package/dist/r2.js +1 -1
- package/dist/reason2.js +100 -0
- package/dist/scalameta.js +12 -1
- package/dist/services/MultiEditorStandaloneCodeEditorService.d.ts +3 -3
- package/dist/services/TextModelService.d.ts +25 -0
- package/dist/services/functional.d.ts +1 -0
- package/dist/services/lyfecycle.d.ts +13 -0
- package/dist/sql2.js +21 -0
- package/dist/svlangserver-systemverilog.js +395 -0
- package/dist/svlangserver.js +85 -0
- package/dist/swift-swift.code-snippets.js +183 -0
- package/dist/swift2.js +183 -0
- package/dist/systemverilog.js +41 -7
- package/dist/systemverilog.tmLanguage.js +676 -496
- package/dist/systemverilog2.js +208 -0
- package/dist/tcl2.js +151 -0
- package/dist/theme/tools.d.ts +2 -1
- package/dist/ts.worker.js +1 -1
- package/dist/typescript-basics-typescript.code-snippets.js +312 -0
- package/dist/typescript-basics.js +312 -0
- package/dist/typescript-language-features.js +14 -4
- package/dist/typescript2.js +312 -0
- package/dist/typescriptContribution.js +36 -0
- package/dist/typescriptreact2.js +312 -0
- package/dist/vb-vb.code-snippets.js +88 -0
- package/dist/vb2.js +88 -0
- package/dist/verilog-systemverilog.js +327 -140
- package/dist/verilog.js +85 -3
- package/dist/verilog2.js +56 -65
- package/dist/vscode-R-r-snippets.js +534 -0
- package/dist/vscode-R-rmarkdown.js +91 -0
- package/dist/vscode-python.js +9 -0
- package/dist/worker.js +1 -1
- package/package.json +18 -14
- package/stats.html +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import 'monaco-editor/esm/vs/language/html/monaco.contribution';
|
|
2
|
+
import { r as registerWorkerLoader } from './worker.js';
|
|
3
|
+
|
|
4
|
+
const workerLoader = async () => (await import(
|
|
5
|
+
/* webpackChunkName: "MonacoHtmlWorker" */
|
|
6
|
+
'./html.worker.js').then(module => module)).default;
|
|
7
|
+
|
|
8
|
+
registerWorkerLoader('html', workerLoader);
|
|
9
|
+
registerWorkerLoader('handlebars', workerLoader);
|
|
10
|
+
registerWorkerLoader('razor', workerLoader);
|
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { createEditor, registerEditorOpenHandler, registerTextModelContentProvid
|
|
|
3
3
|
import { addVSCodeTheme } from './theme';
|
|
4
4
|
import { updateUserConfiguration, registerConfigurations, registerDefaultConfigurations, onConfigurationChanged, getConfiguration } from './configuration';
|
|
5
5
|
import { getMonacoLanguage } from './languages';
|
|
6
|
-
import {
|
|
6
|
+
import { updateKeybindings, updateEditorKeybindingsMode } from './keybindings';
|
|
7
7
|
import { getThemeData } from './theme/registry';
|
|
8
8
|
import type { IVSCodeTheme } from './theme/tools';
|
|
9
9
|
export * from './tools';
|
|
10
|
-
export { monaco, createEditor, addVSCodeTheme, getThemeData, registerConfigurations, registerDefaultConfigurations, updateUserConfiguration, getConfiguration, onConfigurationChanged,
|
|
10
|
+
export { monaco, createEditor, addVSCodeTheme, getThemeData, registerConfigurations, registerDefaultConfigurations, updateUserConfiguration, getConfiguration, onConfigurationChanged, updateEditorKeybindingsMode, updateKeybindings, getMonacoLanguage, registerTextModelContentProvider, registerEditorOpenHandler };
|
|
11
11
|
export type { IVSCodeTheme };
|
package/dist/java-java.js
CHANGED
package/dist/java.js
CHANGED
|
@@ -17,6 +17,10 @@ var brackets = [
|
|
|
17
17
|
[
|
|
18
18
|
"(",
|
|
19
19
|
")"
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"\"\"\"",
|
|
23
|
+
"\"\"\""
|
|
20
24
|
]
|
|
21
25
|
];
|
|
22
26
|
var autoClosingPairs = [
|
|
@@ -46,6 +50,13 @@ var autoClosingPairs = [
|
|
|
46
50
|
notIn: [
|
|
47
51
|
"string"
|
|
48
52
|
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
open: "\"\"\"",
|
|
56
|
+
close: "\"\"\";",
|
|
57
|
+
notIn: [
|
|
58
|
+
"comment"
|
|
59
|
+
]
|
|
49
60
|
}
|
|
50
61
|
];
|
|
51
62
|
var surroundingPairs = [
|
package/dist/java2.js
CHANGED
|
@@ -46,8 +46,9 @@ var java = [
|
|
|
46
46
|
"scope": 3
|
|
47
47
|
},
|
|
48
48
|
"java.configuration.checkProjectSettingsExclusions": {
|
|
49
|
+
"deprecationMessage": "Please use 'java.import.generatesMetadataFilesAtProjectRoot' to control whether to generate the project metadata files at the project root. And use 'files.exclude' to control whether to hide the project metadata files from the file explorer.",
|
|
49
50
|
"type": "boolean",
|
|
50
|
-
"default":
|
|
51
|
+
"default": false,
|
|
51
52
|
"description": "Controls whether to exclude extension-generated project settings files (.project, .classpath, .factorypath, .settings/) from the file explorer.",
|
|
52
53
|
"scope": 3
|
|
53
54
|
},
|
|
@@ -199,7 +200,7 @@ var java = [
|
|
|
199
200
|
"null",
|
|
200
201
|
"integer"
|
|
201
202
|
],
|
|
202
|
-
"default":
|
|
203
|
+
"default": 90,
|
|
203
204
|
"minimum": 1,
|
|
204
205
|
"description": "The number of days (if enabled) to keep unused workspace cache data. Beyond this limit, cached workspace data may be removed.",
|
|
205
206
|
"scope": 1
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var javascriptJavascript_codeSnippets = {
|
|
2
|
+
"define module": {
|
|
3
|
+
prefix: "define",
|
|
4
|
+
body: [
|
|
5
|
+
"define([",
|
|
6
|
+
"\t'require',",
|
|
7
|
+
"\t'${1:dependency}'",
|
|
8
|
+
"], function(require, ${2:factory}) {",
|
|
9
|
+
"\t'use strict';",
|
|
10
|
+
"\t$0",
|
|
11
|
+
"});"
|
|
12
|
+
],
|
|
13
|
+
description: "define module"
|
|
14
|
+
},
|
|
15
|
+
"For Loop": {
|
|
16
|
+
prefix: "for",
|
|
17
|
+
body: [
|
|
18
|
+
"for (let ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
|
|
19
|
+
"\tconst ${3:element} = ${2:array}[${1:index}];",
|
|
20
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
21
|
+
"}"
|
|
22
|
+
],
|
|
23
|
+
description: "For Loop"
|
|
24
|
+
},
|
|
25
|
+
"For-Each Loop": {
|
|
26
|
+
prefix: "foreach",
|
|
27
|
+
body: [
|
|
28
|
+
"${1:array}.forEach(${2:element} => {",
|
|
29
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
30
|
+
"});"
|
|
31
|
+
],
|
|
32
|
+
description: "For-Each Loop"
|
|
33
|
+
},
|
|
34
|
+
"For-In Loop": {
|
|
35
|
+
prefix: "forin",
|
|
36
|
+
body: [
|
|
37
|
+
"for (const ${1:key} in ${2:object}) {",
|
|
38
|
+
"\tif (Object.hasOwnProperty.call(${2:object}, ${1:key})) {",
|
|
39
|
+
"\t\tconst ${3:element} = ${2:object}[${1:key}];",
|
|
40
|
+
"\t\t$TM_SELECTED_TEXT$0",
|
|
41
|
+
"\t}",
|
|
42
|
+
"}"
|
|
43
|
+
],
|
|
44
|
+
description: "For-In Loop"
|
|
45
|
+
},
|
|
46
|
+
"For-Of Loop": {
|
|
47
|
+
prefix: "forof",
|
|
48
|
+
body: [
|
|
49
|
+
"for (const ${1:iterator} of ${2:object}) {",
|
|
50
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
51
|
+
"}"
|
|
52
|
+
],
|
|
53
|
+
description: "For-Of Loop"
|
|
54
|
+
},
|
|
55
|
+
"Function Statement": {
|
|
56
|
+
prefix: "function",
|
|
57
|
+
body: [
|
|
58
|
+
"function ${1:name}(${2:params}) {",
|
|
59
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
60
|
+
"}"
|
|
61
|
+
],
|
|
62
|
+
description: "Function Statement"
|
|
63
|
+
},
|
|
64
|
+
"If Statement": {
|
|
65
|
+
prefix: "if",
|
|
66
|
+
body: [
|
|
67
|
+
"if (${1:condition}) {",
|
|
68
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
69
|
+
"}"
|
|
70
|
+
],
|
|
71
|
+
description: "If Statement"
|
|
72
|
+
},
|
|
73
|
+
"If-Else Statement": {
|
|
74
|
+
prefix: "ifelse",
|
|
75
|
+
body: [
|
|
76
|
+
"if (${1:condition}) {",
|
|
77
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
78
|
+
"} else {",
|
|
79
|
+
"\t",
|
|
80
|
+
"}"
|
|
81
|
+
],
|
|
82
|
+
description: "If-Else Statement"
|
|
83
|
+
},
|
|
84
|
+
"New Statement": {
|
|
85
|
+
prefix: "new",
|
|
86
|
+
body: [
|
|
87
|
+
"const ${1:name} = new ${2:type}(${3:arguments});$0"
|
|
88
|
+
],
|
|
89
|
+
description: "New Statement"
|
|
90
|
+
},
|
|
91
|
+
"Switch Statement": {
|
|
92
|
+
prefix: "switch",
|
|
93
|
+
body: [
|
|
94
|
+
"switch (${1:key}) {",
|
|
95
|
+
"\tcase ${2:value}:",
|
|
96
|
+
"\t\t$0",
|
|
97
|
+
"\t\tbreak;",
|
|
98
|
+
"",
|
|
99
|
+
"\tdefault:",
|
|
100
|
+
"\t\tbreak;",
|
|
101
|
+
"}"
|
|
102
|
+
],
|
|
103
|
+
description: "Switch Statement"
|
|
104
|
+
},
|
|
105
|
+
"While Statement": {
|
|
106
|
+
prefix: "while",
|
|
107
|
+
body: [
|
|
108
|
+
"while (${1:condition}) {",
|
|
109
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
110
|
+
"}"
|
|
111
|
+
],
|
|
112
|
+
description: "While Statement"
|
|
113
|
+
},
|
|
114
|
+
"Do-While Statement": {
|
|
115
|
+
prefix: "dowhile",
|
|
116
|
+
body: [
|
|
117
|
+
"do {",
|
|
118
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
119
|
+
"} while (${1:condition});"
|
|
120
|
+
],
|
|
121
|
+
description: "Do-While Statement"
|
|
122
|
+
},
|
|
123
|
+
"Try-Catch Statement": {
|
|
124
|
+
prefix: "trycatch",
|
|
125
|
+
body: [
|
|
126
|
+
"try {",
|
|
127
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
128
|
+
"} catch (${1:error}) {",
|
|
129
|
+
"\t",
|
|
130
|
+
"}"
|
|
131
|
+
],
|
|
132
|
+
description: "Try-Catch Statement"
|
|
133
|
+
},
|
|
134
|
+
"Set Timeout Function": {
|
|
135
|
+
prefix: "settimeout",
|
|
136
|
+
body: [
|
|
137
|
+
"setTimeout(() => {",
|
|
138
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
139
|
+
"}, ${1:timeout});"
|
|
140
|
+
],
|
|
141
|
+
description: "Set Timeout Function"
|
|
142
|
+
},
|
|
143
|
+
"Set Interval Function": {
|
|
144
|
+
prefix: "setinterval",
|
|
145
|
+
body: [
|
|
146
|
+
"setInterval(() => {",
|
|
147
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
148
|
+
"}, ${1:interval});"
|
|
149
|
+
],
|
|
150
|
+
description: "Set Interval Function"
|
|
151
|
+
},
|
|
152
|
+
"Import external module.": {
|
|
153
|
+
prefix: "import statement",
|
|
154
|
+
body: [
|
|
155
|
+
"import { $0 } from \"${1:module}\";"
|
|
156
|
+
],
|
|
157
|
+
description: "Import external module."
|
|
158
|
+
},
|
|
159
|
+
"Region Start": {
|
|
160
|
+
prefix: "#region",
|
|
161
|
+
body: [
|
|
162
|
+
"//#region $0"
|
|
163
|
+
],
|
|
164
|
+
description: "Folding Region Start"
|
|
165
|
+
},
|
|
166
|
+
"Region End": {
|
|
167
|
+
prefix: "#endregion",
|
|
168
|
+
body: [
|
|
169
|
+
"//#endregion"
|
|
170
|
+
],
|
|
171
|
+
description: "Folding Region End"
|
|
172
|
+
},
|
|
173
|
+
"Log to the console": {
|
|
174
|
+
prefix: "log",
|
|
175
|
+
body: [
|
|
176
|
+
"console.log($1);"
|
|
177
|
+
],
|
|
178
|
+
description: "Log to the console"
|
|
179
|
+
},
|
|
180
|
+
"Log warning to console": {
|
|
181
|
+
prefix: "warn",
|
|
182
|
+
body: [
|
|
183
|
+
"console.warn($1);"
|
|
184
|
+
],
|
|
185
|
+
description: "Log warning to the console"
|
|
186
|
+
},
|
|
187
|
+
"Log error to console": {
|
|
188
|
+
prefix: "error",
|
|
189
|
+
body: [
|
|
190
|
+
"console.error($1);"
|
|
191
|
+
],
|
|
192
|
+
description: "Log error to the console"
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export { javascriptJavascript_codeSnippets as default };
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var javascript = {
|
|
2
|
+
"define module": {
|
|
3
|
+
prefix: "define",
|
|
4
|
+
body: [
|
|
5
|
+
"define([",
|
|
6
|
+
"\t'require',",
|
|
7
|
+
"\t'${1:dependency}'",
|
|
8
|
+
"], function(require, ${2:factory}) {",
|
|
9
|
+
"\t'use strict';",
|
|
10
|
+
"\t$0",
|
|
11
|
+
"});"
|
|
12
|
+
],
|
|
13
|
+
description: "define module"
|
|
14
|
+
},
|
|
15
|
+
"For Loop": {
|
|
16
|
+
prefix: "for",
|
|
17
|
+
body: [
|
|
18
|
+
"for (let ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
|
|
19
|
+
"\tconst ${3:element} = ${2:array}[${1:index}];",
|
|
20
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
21
|
+
"}"
|
|
22
|
+
],
|
|
23
|
+
description: "For Loop"
|
|
24
|
+
},
|
|
25
|
+
"For-Each Loop": {
|
|
26
|
+
prefix: "foreach",
|
|
27
|
+
body: [
|
|
28
|
+
"${1:array}.forEach(${2:element} => {",
|
|
29
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
30
|
+
"});"
|
|
31
|
+
],
|
|
32
|
+
description: "For-Each Loop"
|
|
33
|
+
},
|
|
34
|
+
"For-In Loop": {
|
|
35
|
+
prefix: "forin",
|
|
36
|
+
body: [
|
|
37
|
+
"for (const ${1:key} in ${2:object}) {",
|
|
38
|
+
"\tif (Object.hasOwnProperty.call(${2:object}, ${1:key})) {",
|
|
39
|
+
"\t\tconst ${3:element} = ${2:object}[${1:key}];",
|
|
40
|
+
"\t\t$TM_SELECTED_TEXT$0",
|
|
41
|
+
"\t}",
|
|
42
|
+
"}"
|
|
43
|
+
],
|
|
44
|
+
description: "For-In Loop"
|
|
45
|
+
},
|
|
46
|
+
"For-Of Loop": {
|
|
47
|
+
prefix: "forof",
|
|
48
|
+
body: [
|
|
49
|
+
"for (const ${1:iterator} of ${2:object}) {",
|
|
50
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
51
|
+
"}"
|
|
52
|
+
],
|
|
53
|
+
description: "For-Of Loop"
|
|
54
|
+
},
|
|
55
|
+
"Function Statement": {
|
|
56
|
+
prefix: "function",
|
|
57
|
+
body: [
|
|
58
|
+
"function ${1:name}(${2:params}) {",
|
|
59
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
60
|
+
"}"
|
|
61
|
+
],
|
|
62
|
+
description: "Function Statement"
|
|
63
|
+
},
|
|
64
|
+
"If Statement": {
|
|
65
|
+
prefix: "if",
|
|
66
|
+
body: [
|
|
67
|
+
"if (${1:condition}) {",
|
|
68
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
69
|
+
"}"
|
|
70
|
+
],
|
|
71
|
+
description: "If Statement"
|
|
72
|
+
},
|
|
73
|
+
"If-Else Statement": {
|
|
74
|
+
prefix: "ifelse",
|
|
75
|
+
body: [
|
|
76
|
+
"if (${1:condition}) {",
|
|
77
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
78
|
+
"} else {",
|
|
79
|
+
"\t",
|
|
80
|
+
"}"
|
|
81
|
+
],
|
|
82
|
+
description: "If-Else Statement"
|
|
83
|
+
},
|
|
84
|
+
"New Statement": {
|
|
85
|
+
prefix: "new",
|
|
86
|
+
body: [
|
|
87
|
+
"const ${1:name} = new ${2:type}(${3:arguments});$0"
|
|
88
|
+
],
|
|
89
|
+
description: "New Statement"
|
|
90
|
+
},
|
|
91
|
+
"Switch Statement": {
|
|
92
|
+
prefix: "switch",
|
|
93
|
+
body: [
|
|
94
|
+
"switch (${1:key}) {",
|
|
95
|
+
"\tcase ${2:value}:",
|
|
96
|
+
"\t\t$0",
|
|
97
|
+
"\t\tbreak;",
|
|
98
|
+
"",
|
|
99
|
+
"\tdefault:",
|
|
100
|
+
"\t\tbreak;",
|
|
101
|
+
"}"
|
|
102
|
+
],
|
|
103
|
+
description: "Switch Statement"
|
|
104
|
+
},
|
|
105
|
+
"While Statement": {
|
|
106
|
+
prefix: "while",
|
|
107
|
+
body: [
|
|
108
|
+
"while (${1:condition}) {",
|
|
109
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
110
|
+
"}"
|
|
111
|
+
],
|
|
112
|
+
description: "While Statement"
|
|
113
|
+
},
|
|
114
|
+
"Do-While Statement": {
|
|
115
|
+
prefix: "dowhile",
|
|
116
|
+
body: [
|
|
117
|
+
"do {",
|
|
118
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
119
|
+
"} while (${1:condition});"
|
|
120
|
+
],
|
|
121
|
+
description: "Do-While Statement"
|
|
122
|
+
},
|
|
123
|
+
"Try-Catch Statement": {
|
|
124
|
+
prefix: "trycatch",
|
|
125
|
+
body: [
|
|
126
|
+
"try {",
|
|
127
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
128
|
+
"} catch (${1:error}) {",
|
|
129
|
+
"\t",
|
|
130
|
+
"}"
|
|
131
|
+
],
|
|
132
|
+
description: "Try-Catch Statement"
|
|
133
|
+
},
|
|
134
|
+
"Set Timeout Function": {
|
|
135
|
+
prefix: "settimeout",
|
|
136
|
+
body: [
|
|
137
|
+
"setTimeout(() => {",
|
|
138
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
139
|
+
"}, ${1:timeout});"
|
|
140
|
+
],
|
|
141
|
+
description: "Set Timeout Function"
|
|
142
|
+
},
|
|
143
|
+
"Set Interval Function": {
|
|
144
|
+
prefix: "setinterval",
|
|
145
|
+
body: [
|
|
146
|
+
"setInterval(() => {",
|
|
147
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
148
|
+
"}, ${1:interval});"
|
|
149
|
+
],
|
|
150
|
+
description: "Set Interval Function"
|
|
151
|
+
},
|
|
152
|
+
"Import external module.": {
|
|
153
|
+
prefix: "import statement",
|
|
154
|
+
body: [
|
|
155
|
+
"import { $0 } from \"${1:module}\";"
|
|
156
|
+
],
|
|
157
|
+
description: "Import external module."
|
|
158
|
+
},
|
|
159
|
+
"Region Start": {
|
|
160
|
+
prefix: "#region",
|
|
161
|
+
body: [
|
|
162
|
+
"//#region $0"
|
|
163
|
+
],
|
|
164
|
+
description: "Folding Region Start"
|
|
165
|
+
},
|
|
166
|
+
"Region End": {
|
|
167
|
+
prefix: "#endregion",
|
|
168
|
+
body: [
|
|
169
|
+
"//#endregion"
|
|
170
|
+
],
|
|
171
|
+
description: "Folding Region End"
|
|
172
|
+
},
|
|
173
|
+
"Log to the console": {
|
|
174
|
+
prefix: "log",
|
|
175
|
+
body: [
|
|
176
|
+
"console.log($1);"
|
|
177
|
+
],
|
|
178
|
+
description: "Log to the console"
|
|
179
|
+
},
|
|
180
|
+
"Log warning to console": {
|
|
181
|
+
prefix: "warn",
|
|
182
|
+
body: [
|
|
183
|
+
"console.warn($1);"
|
|
184
|
+
],
|
|
185
|
+
description: "Log warning to the console"
|
|
186
|
+
},
|
|
187
|
+
"Log error to console": {
|
|
188
|
+
prefix: "error",
|
|
189
|
+
body: [
|
|
190
|
+
"console.error($1);"
|
|
191
|
+
],
|
|
192
|
+
description: "Log error to the console"
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export { javascript as default };
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var javascriptreact = {
|
|
2
|
+
"define module": {
|
|
3
|
+
prefix: "define",
|
|
4
|
+
body: [
|
|
5
|
+
"define([",
|
|
6
|
+
"\t'require',",
|
|
7
|
+
"\t'${1:dependency}'",
|
|
8
|
+
"], function(require, ${2:factory}) {",
|
|
9
|
+
"\t'use strict';",
|
|
10
|
+
"\t$0",
|
|
11
|
+
"});"
|
|
12
|
+
],
|
|
13
|
+
description: "define module"
|
|
14
|
+
},
|
|
15
|
+
"For Loop": {
|
|
16
|
+
prefix: "for",
|
|
17
|
+
body: [
|
|
18
|
+
"for (let ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
|
|
19
|
+
"\tconst ${3:element} = ${2:array}[${1:index}];",
|
|
20
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
21
|
+
"}"
|
|
22
|
+
],
|
|
23
|
+
description: "For Loop"
|
|
24
|
+
},
|
|
25
|
+
"For-Each Loop": {
|
|
26
|
+
prefix: "foreach",
|
|
27
|
+
body: [
|
|
28
|
+
"${1:array}.forEach(${2:element} => {",
|
|
29
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
30
|
+
"});"
|
|
31
|
+
],
|
|
32
|
+
description: "For-Each Loop"
|
|
33
|
+
},
|
|
34
|
+
"For-In Loop": {
|
|
35
|
+
prefix: "forin",
|
|
36
|
+
body: [
|
|
37
|
+
"for (const ${1:key} in ${2:object}) {",
|
|
38
|
+
"\tif (Object.hasOwnProperty.call(${2:object}, ${1:key})) {",
|
|
39
|
+
"\t\tconst ${3:element} = ${2:object}[${1:key}];",
|
|
40
|
+
"\t\t$TM_SELECTED_TEXT$0",
|
|
41
|
+
"\t}",
|
|
42
|
+
"}"
|
|
43
|
+
],
|
|
44
|
+
description: "For-In Loop"
|
|
45
|
+
},
|
|
46
|
+
"For-Of Loop": {
|
|
47
|
+
prefix: "forof",
|
|
48
|
+
body: [
|
|
49
|
+
"for (const ${1:iterator} of ${2:object}) {",
|
|
50
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
51
|
+
"}"
|
|
52
|
+
],
|
|
53
|
+
description: "For-Of Loop"
|
|
54
|
+
},
|
|
55
|
+
"Function Statement": {
|
|
56
|
+
prefix: "function",
|
|
57
|
+
body: [
|
|
58
|
+
"function ${1:name}(${2:params}) {",
|
|
59
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
60
|
+
"}"
|
|
61
|
+
],
|
|
62
|
+
description: "Function Statement"
|
|
63
|
+
},
|
|
64
|
+
"If Statement": {
|
|
65
|
+
prefix: "if",
|
|
66
|
+
body: [
|
|
67
|
+
"if (${1:condition}) {",
|
|
68
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
69
|
+
"}"
|
|
70
|
+
],
|
|
71
|
+
description: "If Statement"
|
|
72
|
+
},
|
|
73
|
+
"If-Else Statement": {
|
|
74
|
+
prefix: "ifelse",
|
|
75
|
+
body: [
|
|
76
|
+
"if (${1:condition}) {",
|
|
77
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
78
|
+
"} else {",
|
|
79
|
+
"\t",
|
|
80
|
+
"}"
|
|
81
|
+
],
|
|
82
|
+
description: "If-Else Statement"
|
|
83
|
+
},
|
|
84
|
+
"New Statement": {
|
|
85
|
+
prefix: "new",
|
|
86
|
+
body: [
|
|
87
|
+
"const ${1:name} = new ${2:type}(${3:arguments});$0"
|
|
88
|
+
],
|
|
89
|
+
description: "New Statement"
|
|
90
|
+
},
|
|
91
|
+
"Switch Statement": {
|
|
92
|
+
prefix: "switch",
|
|
93
|
+
body: [
|
|
94
|
+
"switch (${1:key}) {",
|
|
95
|
+
"\tcase ${2:value}:",
|
|
96
|
+
"\t\t$0",
|
|
97
|
+
"\t\tbreak;",
|
|
98
|
+
"",
|
|
99
|
+
"\tdefault:",
|
|
100
|
+
"\t\tbreak;",
|
|
101
|
+
"}"
|
|
102
|
+
],
|
|
103
|
+
description: "Switch Statement"
|
|
104
|
+
},
|
|
105
|
+
"While Statement": {
|
|
106
|
+
prefix: "while",
|
|
107
|
+
body: [
|
|
108
|
+
"while (${1:condition}) {",
|
|
109
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
110
|
+
"}"
|
|
111
|
+
],
|
|
112
|
+
description: "While Statement"
|
|
113
|
+
},
|
|
114
|
+
"Do-While Statement": {
|
|
115
|
+
prefix: "dowhile",
|
|
116
|
+
body: [
|
|
117
|
+
"do {",
|
|
118
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
119
|
+
"} while (${1:condition});"
|
|
120
|
+
],
|
|
121
|
+
description: "Do-While Statement"
|
|
122
|
+
},
|
|
123
|
+
"Try-Catch Statement": {
|
|
124
|
+
prefix: "trycatch",
|
|
125
|
+
body: [
|
|
126
|
+
"try {",
|
|
127
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
128
|
+
"} catch (${1:error}) {",
|
|
129
|
+
"\t",
|
|
130
|
+
"}"
|
|
131
|
+
],
|
|
132
|
+
description: "Try-Catch Statement"
|
|
133
|
+
},
|
|
134
|
+
"Set Timeout Function": {
|
|
135
|
+
prefix: "settimeout",
|
|
136
|
+
body: [
|
|
137
|
+
"setTimeout(() => {",
|
|
138
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
139
|
+
"}, ${1:timeout});"
|
|
140
|
+
],
|
|
141
|
+
description: "Set Timeout Function"
|
|
142
|
+
},
|
|
143
|
+
"Set Interval Function": {
|
|
144
|
+
prefix: "setinterval",
|
|
145
|
+
body: [
|
|
146
|
+
"setInterval(() => {",
|
|
147
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
148
|
+
"}, ${1:interval});"
|
|
149
|
+
],
|
|
150
|
+
description: "Set Interval Function"
|
|
151
|
+
},
|
|
152
|
+
"Import external module.": {
|
|
153
|
+
prefix: "import statement",
|
|
154
|
+
body: [
|
|
155
|
+
"import { $0 } from \"${1:module}\";"
|
|
156
|
+
],
|
|
157
|
+
description: "Import external module."
|
|
158
|
+
},
|
|
159
|
+
"Region Start": {
|
|
160
|
+
prefix: "#region",
|
|
161
|
+
body: [
|
|
162
|
+
"//#region $0"
|
|
163
|
+
],
|
|
164
|
+
description: "Folding Region Start"
|
|
165
|
+
},
|
|
166
|
+
"Region End": {
|
|
167
|
+
prefix: "#endregion",
|
|
168
|
+
body: [
|
|
169
|
+
"//#endregion"
|
|
170
|
+
],
|
|
171
|
+
description: "Folding Region End"
|
|
172
|
+
},
|
|
173
|
+
"Log to the console": {
|
|
174
|
+
prefix: "log",
|
|
175
|
+
body: [
|
|
176
|
+
"console.log($1);"
|
|
177
|
+
],
|
|
178
|
+
description: "Log to the console"
|
|
179
|
+
},
|
|
180
|
+
"Log warning to console": {
|
|
181
|
+
prefix: "warn",
|
|
182
|
+
body: [
|
|
183
|
+
"console.warn($1);"
|
|
184
|
+
],
|
|
185
|
+
description: "Log warning to the console"
|
|
186
|
+
},
|
|
187
|
+
"Log error to console": {
|
|
188
|
+
prefix: "error",
|
|
189
|
+
body: [
|
|
190
|
+
"console.error($1);"
|
|
191
|
+
],
|
|
192
|
+
description: "Log error to the console"
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export { javascriptreact as default };
|