@codingame/monaco-editor-wrapper 1.2.1 → 1.4.2
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 +22 -1
- package/dist/JavaScriptReact.tmLanguage.js +22 -1
- package/dist/SQL.plist.js +482 -0
- package/dist/TypeScript.tmLanguage.js +22 -1
- package/dist/TypeScriptReact.tmLanguage.js +22 -1
- package/dist/angular.js +56 -0
- package/dist/bsv2.js +49 -0
- package/dist/buildtarget.js +53 -0
- package/dist/c2.js +18 -0
- package/dist/clojure.tmLanguage.js +11 -15
- package/dist/cobol2.js +80 -0
- package/dist/coffeescript2.js +18 -0
- package/dist/configuration/hack.d.ts +2 -0
- package/dist/cpp2.js +18 -0
- package/dist/cpptools.js +2320 -0
- package/dist/csharp.tmLanguage.js +5 -5
- package/dist/csharp2.js +508 -0
- package/dist/d2.js +2 -66
- package/dist/d3.js +526 -0
- package/dist/dart3.js +966 -0
- package/dist/dcf.js +3 -3
- package/dist/diet3.js +92 -0
- package/dist/elixir3.js +40 -0
- package/dist/erlang2.js +92 -0
- package/dist/extensionConfigurations.js +1418 -1171
- package/dist/features/cssContribution.js +10 -0
- package/dist/features/extensionConfigurations.d.ts +1 -0
- package/dist/features/extensionConfigurations.js +145 -0
- package/dist/features/htmlContribution.js +10 -0
- package/dist/features/jsonContribution.js +84 -0
- package/dist/features/typescriptContribution.d.ts +4 -0
- package/dist/features/typescriptContribution.js +64 -0
- package/dist/fsharp.tmLanguage.js +10 -1
- package/dist/fsharp2.js +18 -0
- package/dist/groovy2.js +229 -0
- package/dist/haskell2.js +16 -0
- package/dist/html (eex).js +31 -0
- package/dist/java2.js +704 -0
- package/dist/javascript.js +83 -2
- package/dist/javascript2.js +196 -0
- package/dist/javascriptreact.js +83 -2
- package/dist/javascriptreact2.js +196 -0
- package/dist/jsonContribution.js +40 -46
- package/dist/jsx-tags.js +51 -2
- package/dist/jvm-bytecode-verbose.js +1231 -0
- package/dist/jvm-bytecode.js +565 -0
- package/dist/kotlin2.js +117 -0
- package/dist/kotlinscript2.js +117 -0
- package/dist/languages/extensions/configurationLoader.d.ts +1 -13
- package/dist/languages/extensions/extensionConfigurationLoader.d.ts +3 -0
- package/dist/languages/extensions/grammarLoader.d.ts +2 -101920
- package/dist/languages/extensions/languageConfigurationLoader.d.ts +3 -0
- package/dist/languages/extensions/snippetLoader.d.ts +3 -5606
- package/dist/languages/monarch/list.d.ts +7 -0
- package/dist/languages/textMate/TextMateTokensProvider.d.ts +11 -0
- package/dist/lua2.js +1511 -0
- package/dist/main.js +155 -98
- package/dist/markdown-basics.js +103 -0
- package/dist/markdown2.js +103 -0
- package/dist/ocaml3.js +145 -0
- package/dist/omnisharp.js +522 -0
- package/dist/pascal2.js +26 -0
- package/dist/pgsql-sql.js +21 -0
- package/dist/pgsql.js +21 -0
- package/dist/php2.js +265 -0
- package/dist/postgresql.js +75 -0
- package/dist/powershell2.js +18 -0
- package/dist/r.tmLanguage.js +572 -0
- package/dist/reason2.js +100 -0
- package/dist/rmd.js +8 -1
- package/dist/scalameta.js +177 -0
- package/dist/services/functional.d.ts +1 -0
- package/dist/services/lyfecycle.d.ts +13 -0
- package/dist/solargraph.js +192 -0
- package/dist/sql.js +9 -2
- package/dist/sql2.js +21 -0
- package/dist/swift2.js +183 -0
- package/dist/systemverilog2.js +208 -0
- package/dist/tasty.js +72 -0
- package/dist/tcl2.js +151 -0
- package/dist/typescript-basics.js +312 -0
- package/dist/typescript-language-features.js +998 -0
- package/dist/typescript.js +83 -2
- package/dist/typescript2.js +312 -0
- package/dist/typescriptreact.js +83 -2
- package/dist/typescriptreact2.js +312 -0
- package/dist/vb2.js +88 -0
- package/dist/verilog2.js +94 -0
- package/dist/vscode-R.js +519 -0
- package/dist/vscode-groovy.js +28 -0
- package/dist/vscode-python.js +677 -0
- package/package.json +11 -11
- package/stats.html +205 -795
package/dist/javascript.js
CHANGED
|
@@ -104,13 +104,94 @@ var folding = {
|
|
|
104
104
|
end: "^\\s*//\\s*#?endregion\\b"
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
+
var wordPattern = {
|
|
108
|
+
pattern: "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>/\\?\\s]+)"
|
|
109
|
+
};
|
|
110
|
+
var indentationRules = {
|
|
111
|
+
decreaseIndentPattern: {
|
|
112
|
+
pattern: "^((?!.*?/\\*).*\\*/)?\\s*[\\}\\]].*$"
|
|
113
|
+
},
|
|
114
|
+
increaseIndentPattern: {
|
|
115
|
+
pattern: "^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"
|
|
116
|
+
},
|
|
117
|
+
unIndentedLinePattern: {
|
|
118
|
+
pattern: "^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$"
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
var onEnterRules = [
|
|
122
|
+
{
|
|
123
|
+
beforeText: {
|
|
124
|
+
pattern: "^\\s*/\\*\\*(?!/)([^\\*]|\\*(?!/))*$"
|
|
125
|
+
},
|
|
126
|
+
afterText: {
|
|
127
|
+
pattern: "^\\s*\\*/$"
|
|
128
|
+
},
|
|
129
|
+
action: {
|
|
130
|
+
indent: "indentOutdent",
|
|
131
|
+
appendText: " * "
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
beforeText: {
|
|
136
|
+
pattern: "^\\s*/\\*\\*(?!/)([^\\*]|\\*(?!/))*$"
|
|
137
|
+
},
|
|
138
|
+
action: {
|
|
139
|
+
indent: "none",
|
|
140
|
+
appendText: " * "
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
beforeText: {
|
|
145
|
+
pattern: "^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$"
|
|
146
|
+
},
|
|
147
|
+
previousLineText: {
|
|
148
|
+
pattern: "(?=^(\\s*(/\\*\\*|\\*)).*)(?=(?!(\\s*\\*/)))"
|
|
149
|
+
},
|
|
150
|
+
action: {
|
|
151
|
+
indent: "none",
|
|
152
|
+
appendText: "* "
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
beforeText: {
|
|
157
|
+
pattern: "^(\\t|[ ])*[ ]\\*/\\s*$"
|
|
158
|
+
},
|
|
159
|
+
action: {
|
|
160
|
+
indent: "none",
|
|
161
|
+
removeText: 1
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
beforeText: {
|
|
166
|
+
pattern: "^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$"
|
|
167
|
+
},
|
|
168
|
+
action: {
|
|
169
|
+
indent: "none",
|
|
170
|
+
removeText: 1
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
beforeText: {
|
|
175
|
+
pattern: "^\\s*(\\bcase\\s.+:|\\bdefault:)$"
|
|
176
|
+
},
|
|
177
|
+
afterText: {
|
|
178
|
+
pattern: "^(?!\\s*(\\bcase\\b|\\bdefault\\b))"
|
|
179
|
+
},
|
|
180
|
+
action: {
|
|
181
|
+
indent: "indent"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
];
|
|
107
185
|
var javascript = {
|
|
108
186
|
comments: comments,
|
|
109
187
|
brackets: brackets,
|
|
110
188
|
autoClosingPairs: autoClosingPairs,
|
|
111
189
|
surroundingPairs: surroundingPairs,
|
|
112
190
|
autoCloseBefore: autoCloseBefore,
|
|
113
|
-
folding: folding
|
|
191
|
+
folding: folding,
|
|
192
|
+
wordPattern: wordPattern,
|
|
193
|
+
indentationRules: indentationRules,
|
|
194
|
+
onEnterRules: onEnterRules
|
|
114
195
|
};
|
|
115
196
|
|
|
116
|
-
export { autoCloseBefore, autoClosingPairs, brackets, comments, javascript as default, folding, surroundingPairs };
|
|
197
|
+
export { autoCloseBefore, autoClosingPairs, brackets, comments, javascript as default, folding, indentationRules, onEnterRules, surroundingPairs, wordPattern };
|
|
@@ -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 };
|
package/dist/javascriptreact.js
CHANGED
|
@@ -104,13 +104,94 @@ var folding = {
|
|
|
104
104
|
end: "^\\s*//\\s*#?endregion\\b"
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
+
var wordPattern = {
|
|
108
|
+
pattern: "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>/\\?\\s]+)"
|
|
109
|
+
};
|
|
110
|
+
var indentationRules = {
|
|
111
|
+
decreaseIndentPattern: {
|
|
112
|
+
pattern: "^((?!.*?/\\*).*\\*/)?\\s*[\\}\\]].*$"
|
|
113
|
+
},
|
|
114
|
+
increaseIndentPattern: {
|
|
115
|
+
pattern: "^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"
|
|
116
|
+
},
|
|
117
|
+
unIndentedLinePattern: {
|
|
118
|
+
pattern: "^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$|^(\\t|[ ])*[ ]\\*/\\s*$|^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$"
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
var onEnterRules = [
|
|
122
|
+
{
|
|
123
|
+
beforeText: {
|
|
124
|
+
pattern: "^\\s*/\\*\\*(?!/)([^\\*]|\\*(?!/))*$"
|
|
125
|
+
},
|
|
126
|
+
afterText: {
|
|
127
|
+
pattern: "^\\s*\\*/$"
|
|
128
|
+
},
|
|
129
|
+
action: {
|
|
130
|
+
indent: "indentOutdent",
|
|
131
|
+
appendText: " * "
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
beforeText: {
|
|
136
|
+
pattern: "^\\s*/\\*\\*(?!/)([^\\*]|\\*(?!/))*$"
|
|
137
|
+
},
|
|
138
|
+
action: {
|
|
139
|
+
indent: "none",
|
|
140
|
+
appendText: " * "
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
beforeText: {
|
|
145
|
+
pattern: "^(\\t|[ ])*[ ]\\*([ ]([^\\*]|\\*(?!/))*)?$"
|
|
146
|
+
},
|
|
147
|
+
previousLineText: {
|
|
148
|
+
pattern: "(?=^(\\s*(/\\*\\*|\\*)).*)(?=(?!(\\s*\\*/)))"
|
|
149
|
+
},
|
|
150
|
+
action: {
|
|
151
|
+
indent: "none",
|
|
152
|
+
appendText: "* "
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
beforeText: {
|
|
157
|
+
pattern: "^(\\t|[ ])*[ ]\\*/\\s*$"
|
|
158
|
+
},
|
|
159
|
+
action: {
|
|
160
|
+
indent: "none",
|
|
161
|
+
removeText: 1
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
beforeText: {
|
|
166
|
+
pattern: "^(\\t|[ ])*[ ]\\*[^/]*\\*/\\s*$"
|
|
167
|
+
},
|
|
168
|
+
action: {
|
|
169
|
+
indent: "none",
|
|
170
|
+
removeText: 1
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
beforeText: {
|
|
175
|
+
pattern: "^\\s*(\\bcase\\s.+:|\\bdefault:)$"
|
|
176
|
+
},
|
|
177
|
+
afterText: {
|
|
178
|
+
pattern: "^(?!\\s*(\\bcase\\b|\\bdefault\\b))"
|
|
179
|
+
},
|
|
180
|
+
action: {
|
|
181
|
+
indent: "indent"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
];
|
|
107
185
|
var javascriptreact = {
|
|
108
186
|
comments: comments,
|
|
109
187
|
brackets: brackets,
|
|
110
188
|
autoClosingPairs: autoClosingPairs,
|
|
111
189
|
surroundingPairs: surroundingPairs,
|
|
112
190
|
autoCloseBefore: autoCloseBefore,
|
|
113
|
-
folding: folding
|
|
191
|
+
folding: folding,
|
|
192
|
+
wordPattern: wordPattern,
|
|
193
|
+
indentationRules: indentationRules,
|
|
194
|
+
onEnterRules: onEnterRules
|
|
114
195
|
};
|
|
115
196
|
|
|
116
|
-
export { autoCloseBefore, autoClosingPairs, brackets, comments, javascriptreact as default, folding, surroundingPairs };
|
|
197
|
+
export { autoCloseBefore, autoClosingPairs, brackets, comments, javascriptreact as default, folding, indentationRules, onEnterRules, surroundingPairs, wordPattern };
|
|
@@ -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 };
|
package/dist/jsonContribution.js
CHANGED
|
@@ -3,11 +3,11 @@ import 'monaco-editor/esm/vs/language/json/monaco.contribution';
|
|
|
3
3
|
import * as monaco from 'monaco-editor/esm/vs/editor/edcore.main';
|
|
4
4
|
import { r as registerWorkerLoader } from './worker.js';
|
|
5
5
|
|
|
6
|
-
const
|
|
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
7
|
|
|
8
8
|
{
|
|
9
9
|
const allCommands = monaco.extra.CommandsRegistry.getCommands();
|
|
10
|
-
const keybindingsCommandSchema =
|
|
10
|
+
const keybindingsCommandSchema = schemasById['vscode://schemas/keybindings'].items.properties.command.anyOf[0];
|
|
11
11
|
keybindingsCommandSchema.enum = Array.from(allCommands.keys());
|
|
12
12
|
keybindingsCommandSchema.enumDescriptions = Array.from(allCommands.values()).map(command => {
|
|
13
13
|
var _command$description;
|
|
@@ -32,50 +32,44 @@ const vimKeybindingsSchema = {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
'
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
'
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
'
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}]
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
updateDiagnosticsOptions();
|
|
78
|
-
registry.onDidChangeSchema(updateDiagnosticsOptions);
|
|
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
|
+
});
|
|
79
73
|
|
|
80
74
|
const workerLoader = async () => (await import(
|
|
81
75
|
/* webpackChunkName: "MonacoJsonWorker" */
|