@codingame/monaco-editor-wrapper 1.6.0 → 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 +2 -2
- package/dist/csharp2.js +508 -0
- 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/html (eex).js +31 -0
- package/dist/htmlContribution.js +10 -0
- package/dist/java.js +11 -0
- package/dist/java2.js +1 -1
- package/dist/javascript-javascript.code-snippets.js +196 -0
- package/dist/javascript2.js +196 -0
- package/dist/javascriptreact2.js +196 -0
- package/dist/jsonContribution.js +78 -0
- package/dist/kotlin2.js +117 -0
- package/dist/kotlinscript2.js +117 -0
- package/dist/languages/extensions/configurationLoader.d.ts +2 -20
- package/dist/languages/monarch/list.d.ts +7 -0
- package/dist/languages/textMate/TextMateTokensProvider.d.ts +11 -0
- package/dist/main.js +42 -124
- package/dist/markdown-basics-markdown.code-snippets.js +121 -0
- package/dist/markdown-basics-markdown.js +0 -18
- package/dist/markdown-basics.js +103 -0
- package/dist/markdown2.js +103 -0
- 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 +6 -1
- 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/typescript-basics-typescript.code-snippets.js +312 -0
- package/dist/typescript-basics.js +312 -0
- 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-R-rmd.js +2 -2
- package/dist/vscode-python.js +9 -0
- package/package.json +1 -1
- package/stats.html +1 -1
- package/dist/Groovy2.js +0 -28
- package/dist/features/mutualizedExtensionConfigurations.d.ts +0 -1
- package/dist/features/mutualizedExtensionConfigurations.js +0 -4857
- package/dist/services/CustomFoldingRulesLanguageConfigurationService.d.ts +0 -4
|
@@ -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 };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { _ as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import 'monaco-editor/esm/vs/language/json/monaco.contribution';
|
|
3
|
+
import * as monaco from 'monaco-editor/esm/vs/editor/edcore.main';
|
|
4
|
+
import { r as registerWorkerLoader } from './worker.js';
|
|
5
|
+
|
|
6
|
+
const schemasById = monaco.extra.Registry.as(monaco.extra.JsonContributionExtensions.JSONContribution).getSchemaContributions().schemas; // Hack because the commands are filled by a code not run in monaco-editor
|
|
7
|
+
|
|
8
|
+
{
|
|
9
|
+
const allCommands = monaco.extra.CommandsRegistry.getCommands();
|
|
10
|
+
const keybindingsCommandSchema = schemasById['vscode://schemas/keybindings'].items.properties.command.anyOf[0];
|
|
11
|
+
keybindingsCommandSchema.enum = Array.from(allCommands.keys());
|
|
12
|
+
keybindingsCommandSchema.enumDescriptions = Array.from(allCommands.values()).map(command => {
|
|
13
|
+
var _command$description;
|
|
14
|
+
|
|
15
|
+
return (_command$description = command.description) === null || _command$description === void 0 ? void 0 : _command$description.description;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
const vimKeybindingsSchema = {
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties: {
|
|
21
|
+
before: {
|
|
22
|
+
type: 'array',
|
|
23
|
+
items: {
|
|
24
|
+
type: 'string'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
after: {
|
|
28
|
+
type: 'array',
|
|
29
|
+
items: {
|
|
30
|
+
type: 'string'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
36
|
+
comments: 'ignore',
|
|
37
|
+
validate: true,
|
|
38
|
+
schemas: [{
|
|
39
|
+
uri: 'vscode://schemas/settings/resourceLanguage',
|
|
40
|
+
schema: schemasById['vscode://schemas/settings/resourceLanguage']
|
|
41
|
+
}, {
|
|
42
|
+
uri: 'vscode://schemas/keybindings',
|
|
43
|
+
fileMatch: ['file:///keybindings.json'],
|
|
44
|
+
schema: schemasById['vscode://schemas/keybindings']
|
|
45
|
+
}, {
|
|
46
|
+
uri: 'vscode://schemas/settings/user',
|
|
47
|
+
fileMatch: ['file:///settings.json'],
|
|
48
|
+
schema: {
|
|
49
|
+
properties: _objectSpread2(_objectSpread2({}, monaco.extra.allSettings.properties), {}, {
|
|
50
|
+
'vim.normalModeKeyBindings': {
|
|
51
|
+
type: 'array',
|
|
52
|
+
description: 'Remapped keys in Normal mode.',
|
|
53
|
+
items: vimKeybindingsSchema
|
|
54
|
+
},
|
|
55
|
+
'vim.insertModeKeyBindings': {
|
|
56
|
+
type: 'array',
|
|
57
|
+
description: 'Remapped keys in Insert mode.',
|
|
58
|
+
items: vimKeybindingsSchema
|
|
59
|
+
},
|
|
60
|
+
'vim.visualModeKeyBindings': {
|
|
61
|
+
type: 'array',
|
|
62
|
+
description: 'Remapped keys in Visual mode.',
|
|
63
|
+
items: vimKeybindingsSchema
|
|
64
|
+
}
|
|
65
|
+
}),
|
|
66
|
+
patternProperties: monaco.extra.allSettings.patternProperties,
|
|
67
|
+
additionalProperties: true,
|
|
68
|
+
allowTrailingCommas: true,
|
|
69
|
+
allowComments: true
|
|
70
|
+
}
|
|
71
|
+
}]
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const workerLoader = async () => (await import(
|
|
75
|
+
/* webpackChunkName: "MonacoJsonWorker" */
|
|
76
|
+
'./json.worker.js').then(module => module)).default;
|
|
77
|
+
|
|
78
|
+
registerWorkerLoader('json', workerLoader);
|