@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
package/dist/main.js
CHANGED
|
@@ -8,44 +8,20 @@ import EmacsExtension from '@codingame/monaco-emacs';
|
|
|
8
8
|
import * as monacoVim from 'monaco-vim';
|
|
9
9
|
|
|
10
10
|
function _mergeNamespaces(n, m) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
m.forEach(function (e) {
|
|
12
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default' && !(k in n)) {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
return Object.freeze(n);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
monaco.errorHandler.setUnexpectedErrorHandler(error => {
|
|
26
|
-
console.error('Unexpected error', error);
|
|
27
|
-
});
|
|
28
|
-
/* Add custom blocks parsing (for tech.io):
|
|
29
|
-
// { [autofold]
|
|
30
|
-
// custom block content
|
|
31
|
-
// }
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
const CUSTOM_BLOCK_BEGIN_REGEX = '^\\w*(?:\\/\\/|#).*\\{';
|
|
35
|
-
const CUSTOM_BLOCK_END_REGEX = '^\\w*(?:\\/\\/|#).*\\}';
|
|
36
|
-
const original = monaco.languages.LanguageConfigurationRegistryImpl.prototype.getFoldingRules;
|
|
37
|
-
|
|
38
|
-
monaco.languages.LanguageConfigurationRegistryImpl.prototype.getFoldingRules = function (languageId) {
|
|
39
|
-
const foldingRules = original.call(this, languageId);
|
|
40
|
-
const markers = foldingRules.markers;
|
|
41
|
-
return _objectSpread2(_objectSpread2({}, foldingRules), {}, {
|
|
42
|
-
markers: {
|
|
43
|
-
start: markers != null ? new RegExp(markers.start.source + '|' + CUSTOM_BLOCK_BEGIN_REGEX) : new RegExp(CUSTOM_BLOCK_BEGIN_REGEX),
|
|
44
|
-
end: markers != null ? new RegExp(markers.end.source + '|' + CUSTOM_BLOCK_END_REGEX) : new RegExp(CUSTOM_BLOCK_END_REGEX)
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
|
|
49
25
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
50
26
|
|
|
51
27
|
function getDefaultExportFromCjs (x) {
|
|
@@ -62,8 +38,8 @@ var main$1 = {exports: {}};
|
|
|
62
38
|
var main = /*@__PURE__*/getDefaultExportFromCjs(main$1.exports);
|
|
63
39
|
|
|
64
40
|
var vscodeTextmate = /*#__PURE__*/Object.freeze(/*#__PURE__*/_mergeNamespaces({
|
|
65
|
-
|
|
66
|
-
|
|
41
|
+
__proto__: null,
|
|
42
|
+
'default': main
|
|
67
43
|
}, [main$1.exports]));
|
|
68
44
|
|
|
69
45
|
function isValidHexColor(hex) {
|
|
@@ -205,7 +181,7 @@ async function addVSCodeTheme(name, vscodeTheme) {
|
|
|
205
181
|
encodedTokensColors: themeData.tokenColorMap.slice(1)
|
|
206
182
|
});
|
|
207
183
|
|
|
208
|
-
monaco.editor.defineTheme(name, monacoTheme);
|
|
184
|
+
monaco.editor.defineTheme(name, monacoTheme, vscodeTheme.semanticHighlighting);
|
|
209
185
|
}
|
|
210
186
|
function getThemeData(themeName) {
|
|
211
187
|
var _vscodeThemeData$get;
|
|
@@ -273,7 +249,7 @@ class CGTMGrammarFactory extends monaco.extra.TMGrammarFactory {
|
|
|
273
249
|
}, themeData.tokenColorMap);
|
|
274
250
|
};
|
|
275
251
|
|
|
276
|
-
const standaloneThemeService = monaco.
|
|
252
|
+
const standaloneThemeService = monaco.extra.StandaloneServices.get(monaco.editor.IStandaloneThemeService);
|
|
277
253
|
|
|
278
254
|
this._register(standaloneThemeService.onDidColorThemeChange(updateTheme));
|
|
279
255
|
|
|
@@ -288,15 +264,15 @@ function toMonacoToken(token) {
|
|
|
288
264
|
});
|
|
289
265
|
}
|
|
290
266
|
|
|
291
|
-
class CGTMTokenizationSupport extends monaco.extra.
|
|
267
|
+
class CGTMTokenizationSupport extends monaco.extra.TMTokenizationSupportWithLineLimit {
|
|
292
268
|
constructor(languageId, encodedLanguageId, actual, grammar) {
|
|
293
|
-
super(languageId, encodedLanguageId, actual, monaco.
|
|
269
|
+
super(languageId, encodedLanguageId, actual, monaco.extra.StandaloneServices.get(monaco.extra.IConfigurationService));
|
|
294
270
|
this.languageId = languageId;
|
|
295
271
|
this.grammar = grammar;
|
|
296
272
|
} // To make "inspect tokens" work, default impl is `throw new Error('Not supported!');`
|
|
297
273
|
|
|
298
274
|
|
|
299
|
-
tokenize(line, hasEOL, state
|
|
275
|
+
tokenize(line, hasEOL, state) {
|
|
300
276
|
return monaco.languages.adaptTokenize(this.languageId, {
|
|
301
277
|
tokenize: (line, state) => {
|
|
302
278
|
const actualResult = this.grammar.tokenizeLine(line, state);
|
|
@@ -305,7 +281,7 @@ class CGTMTokenizationSupport extends monaco.extra.TMTokenizationSupport {
|
|
|
305
281
|
endState: actualResult.ruleStack
|
|
306
282
|
};
|
|
307
283
|
}
|
|
308
|
-
}, line, state
|
|
284
|
+
}, line, state);
|
|
309
285
|
}
|
|
310
286
|
|
|
311
287
|
}
|
|
@@ -475,6 +451,7 @@ var rawGrammars = [
|
|
|
475
451
|
"meta.embedded.block.pug": "jade",
|
|
476
452
|
"meta.embedded.block.javascript": "javascript",
|
|
477
453
|
"meta.embedded.block.json": "json",
|
|
454
|
+
"meta.embedded.block.jsonc": "jsonc",
|
|
478
455
|
"meta.embedded.block.less": "less",
|
|
479
456
|
"meta.embedded.block.objc": "objc",
|
|
480
457
|
"meta.embedded.block.scss": "scss",
|
|
@@ -865,29 +842,13 @@ var rawGrammars = [
|
|
|
865
842
|
"language": "tcl",
|
|
866
843
|
"scopeName": "source.tcl"
|
|
867
844
|
},
|
|
868
|
-
{
|
|
869
|
-
"language": "verilog",
|
|
870
|
-
"scopeName": "source.verilog"
|
|
871
|
-
},
|
|
872
845
|
{
|
|
873
846
|
"language": "systemverilog",
|
|
874
847
|
"scopeName": "source.systemverilog"
|
|
875
848
|
},
|
|
876
849
|
{
|
|
877
|
-
"language": "
|
|
878
|
-
"scopeName": "source.
|
|
879
|
-
},
|
|
880
|
-
{
|
|
881
|
-
"language": "ucf",
|
|
882
|
-
"scopeName": "source.ucfconstraints"
|
|
883
|
-
},
|
|
884
|
-
{
|
|
885
|
-
"language": "sdc",
|
|
886
|
-
"scopeName": "source.sdc"
|
|
887
|
-
},
|
|
888
|
-
{
|
|
889
|
-
"language": "xdc",
|
|
890
|
-
"scopeName": "source.sdc"
|
|
850
|
+
"language": "verilog",
|
|
851
|
+
"scopeName": "source.systemverilog"
|
|
891
852
|
},
|
|
892
853
|
{
|
|
893
854
|
"scopeName": "markdown.verilog.codeblock",
|
|
@@ -895,8 +856,8 @@ var rawGrammars = [
|
|
|
895
856
|
"text.html.markdown"
|
|
896
857
|
],
|
|
897
858
|
"embeddedLanguages": {
|
|
898
|
-
"meta.embedded.block.
|
|
899
|
-
"meta.embedded.block.
|
|
859
|
+
"meta.embedded.block.systemverilog": "source.systemverilog",
|
|
860
|
+
"meta.embedded.block.verilog": "source.verilog"
|
|
900
861
|
}
|
|
901
862
|
},
|
|
902
863
|
{
|
|
@@ -1269,21 +1230,9 @@ const loader$2 = {
|
|
|
1269
1230
|
'source.tcl': async () => (await import(
|
|
1270
1231
|
/* webpackChunkName: "grammar-source-tcl" */
|
|
1271
1232
|
'./tcl.tmlanguage.yaml.js').then(module => module)).default,
|
|
1272
|
-
'source.verilog': async () => (await import(
|
|
1273
|
-
/* webpackChunkName: "grammar-source-verilog" */
|
|
1274
|
-
'./verilog.tmLanguage.js').then(module => module)).default,
|
|
1275
1233
|
'source.systemverilog': async () => (await import(
|
|
1276
1234
|
/* webpackChunkName: "grammar-source-systemverilog" */
|
|
1277
1235
|
'./systemverilog.tmLanguage.js').then(module => module)).default,
|
|
1278
|
-
'source.bsv': async () => (await import(
|
|
1279
|
-
/* webpackChunkName: "grammar-source-bsv" */
|
|
1280
|
-
'./BSV.tmLanguage.js').then(module => module)).default,
|
|
1281
|
-
'source.ucfconstraints': async () => (await import(
|
|
1282
|
-
/* webpackChunkName: "grammar-source-ucfconstraints" */
|
|
1283
|
-
'./ucf.tmLanguage.js').then(module => module)).default,
|
|
1284
|
-
'source.sdc': async () => (await import(
|
|
1285
|
-
/* webpackChunkName: "grammar-source-sdc" */
|
|
1286
|
-
'./sdc.tmLanguage.js').then(module => module)).default,
|
|
1287
1236
|
'markdown.verilog.codeblock': async () => (await import(
|
|
1288
1237
|
/* webpackChunkName: "grammar-markdown-verilog-codeblock" */
|
|
1289
1238
|
'./codeblock3.js').then(module => module)).default,
|
|
@@ -2510,8 +2459,8 @@ for (const contribution of extensions.semanticTokenScopes) {
|
|
|
2510
2459
|
}
|
|
2511
2460
|
|
|
2512
2461
|
function createGrammarFactory() {
|
|
2513
|
-
const
|
|
2514
|
-
const parsedGrammars = rawGrammars.map(grammar => _objectSpread2(_objectSpread2({}, monaco.extra.parseTextMateGrammar(grammar,
|
|
2462
|
+
const languageService = monaco.extra.StandaloneServices.get(monaco.languages.ILanguageService);
|
|
2463
|
+
const parsedGrammars = rawGrammars.map(grammar => _objectSpread2(_objectSpread2({}, monaco.extra.parseTextMateGrammar(grammar, languageService)), {}, {
|
|
2515
2464
|
location: monaco.Uri.file(grammar.scopeName + '.json')
|
|
2516
2465
|
}));
|
|
2517
2466
|
return new CGTMGrammarFactory(parsedGrammars, loader$2, onigFile);
|
|
@@ -2527,10 +2476,10 @@ function getOrCreateGrammarFactory() {
|
|
|
2527
2476
|
return textMateGrammarFactory;
|
|
2528
2477
|
}
|
|
2529
2478
|
|
|
2530
|
-
const
|
|
2479
|
+
const languageService$2 = monaco.extra.StandaloneServices.get(monaco.languages.ILanguageService);
|
|
2531
2480
|
async function createTextMateTokensProvider(languageId) {
|
|
2532
2481
|
const grammarFactory = getOrCreateGrammarFactory();
|
|
2533
|
-
const encodedLanguageId =
|
|
2482
|
+
const encodedLanguageId = languageService$2.languageIdCodec.encodeLanguageId(languageId);
|
|
2534
2483
|
const {
|
|
2535
2484
|
grammar,
|
|
2536
2485
|
initialState,
|
|
@@ -2543,7 +2492,8 @@ async function createTextMateTokensProvider(languageId) {
|
|
|
2543
2492
|
|
|
2544
2493
|
const tokenization = new monaco.extra.TMTokenization(grammar, initialState, containsEmbeddedLanguages);
|
|
2545
2494
|
tokenization.onDidEncounterLanguage(encodedLanguageId => {
|
|
2546
|
-
|
|
2495
|
+
// Force monaco to load this language and trigger the global `onDidEncounterLanguage`
|
|
2496
|
+
languageService$2.createById(languageService$2.languageIdCodec.decodeLanguageId(encodedLanguageId));
|
|
2547
2497
|
});
|
|
2548
2498
|
return new CGTMTokenizationSupport(languageId, encodedLanguageId, tokenization, grammar);
|
|
2549
2499
|
}
|
|
@@ -2790,7 +2740,8 @@ var textMateLanguages = [
|
|
|
2790
2740
|
".har",
|
|
2791
2741
|
".jslintrc",
|
|
2792
2742
|
".jsonld",
|
|
2793
|
-
".geojson"
|
|
2743
|
+
".geojson",
|
|
2744
|
+
".ipynb"
|
|
2794
2745
|
],
|
|
2795
2746
|
"filenames": [
|
|
2796
2747
|
"composer.lock",
|
|
@@ -3608,68 +3559,28 @@ var textMateLanguages = [
|
|
|
3608
3559
|
".test"
|
|
3609
3560
|
]
|
|
3610
3561
|
},
|
|
3611
|
-
{
|
|
3612
|
-
"id": "verilog",
|
|
3613
|
-
"aliases": [
|
|
3614
|
-
"Verilog",
|
|
3615
|
-
"verilog"
|
|
3616
|
-
],
|
|
3617
|
-
"extensions": [
|
|
3618
|
-
".v",
|
|
3619
|
-
".vh",
|
|
3620
|
-
".vl"
|
|
3621
|
-
]
|
|
3622
|
-
},
|
|
3623
3562
|
{
|
|
3624
3563
|
"id": "systemverilog",
|
|
3625
3564
|
"aliases": [
|
|
3565
|
+
"SystemVerilog",
|
|
3566
|
+
"systemverilog",
|
|
3626
3567
|
"System Verilog",
|
|
3627
|
-
"
|
|
3568
|
+
"Systemverilog"
|
|
3628
3569
|
],
|
|
3629
3570
|
"extensions": [
|
|
3630
3571
|
".sv",
|
|
3631
|
-
".svh"
|
|
3632
|
-
".SV"
|
|
3572
|
+
".svh"
|
|
3633
3573
|
]
|
|
3634
3574
|
},
|
|
3635
3575
|
{
|
|
3636
|
-
"id": "
|
|
3637
|
-
"aliases": [
|
|
3638
|
-
"BluespecSystemVerilog",
|
|
3639
|
-
"Bluespec SystemVerilog",
|
|
3640
|
-
"BSV"
|
|
3641
|
-
],
|
|
3642
|
-
"extensions": [
|
|
3643
|
-
".bsv",
|
|
3644
|
-
".BSV"
|
|
3645
|
-
]
|
|
3646
|
-
},
|
|
3647
|
-
{
|
|
3648
|
-
"id": "ucf",
|
|
3649
|
-
"aliases": [
|
|
3650
|
-
"vivado ucf",
|
|
3651
|
-
"ucf constraints"
|
|
3652
|
-
],
|
|
3653
|
-
"extensions": [
|
|
3654
|
-
".ucf"
|
|
3655
|
-
]
|
|
3656
|
-
},
|
|
3657
|
-
{
|
|
3658
|
-
"id": "sdc",
|
|
3659
|
-
"aliases": [
|
|
3660
|
-
"Synopsys Design Constraints"
|
|
3661
|
-
],
|
|
3662
|
-
"extensions": [
|
|
3663
|
-
".sdc"
|
|
3664
|
-
]
|
|
3665
|
-
},
|
|
3666
|
-
{
|
|
3667
|
-
"id": "xdc",
|
|
3576
|
+
"id": "verilog",
|
|
3668
3577
|
"aliases": [
|
|
3669
|
-
"
|
|
3578
|
+
"Verilog",
|
|
3579
|
+
"verilog"
|
|
3670
3580
|
],
|
|
3671
3581
|
"extensions": [
|
|
3672
|
-
".
|
|
3582
|
+
".v",
|
|
3583
|
+
".vh"
|
|
3673
3584
|
]
|
|
3674
3585
|
},
|
|
3675
3586
|
{
|
|
@@ -3718,12 +3629,12 @@ var textMateLanguages = [
|
|
|
3718
3629
|
"requirements.txt"
|
|
3719
3630
|
],
|
|
3720
3631
|
"filenamePatterns": [
|
|
3721
|
-
"
|
|
3722
|
-
"
|
|
3723
|
-
"
|
|
3724
|
-
"constraints-*.txt",
|
|
3725
|
-
"requirements
|
|
3726
|
-
"
|
|
3632
|
+
"**/*-requirements.{txt, in}",
|
|
3633
|
+
"**/*-contstraints.txt",
|
|
3634
|
+
"**/requirements-*.{txt, in}",
|
|
3635
|
+
"**/constraints-*.txt",
|
|
3636
|
+
"**/requirements/*.{txt,in}",
|
|
3637
|
+
"**/constraints/*.txt"
|
|
3727
3638
|
],
|
|
3728
3639
|
"filenames": [
|
|
3729
3640
|
"constraints.txt",
|
|
@@ -4113,24 +4024,12 @@ const loader$1 = {
|
|
|
4113
4024
|
'tcl': async () => (await import(
|
|
4114
4025
|
/* webpackChunkName: "language-configuration-tcl" */
|
|
4115
4026
|
'./tcl.js').then(module => module)).default,
|
|
4116
|
-
'verilog': async () => (await import(
|
|
4117
|
-
/* webpackChunkName: "language-configuration-verilog" */
|
|
4118
|
-
'./verilog.js').then(module => module)).default,
|
|
4119
4027
|
'systemverilog': async () => (await import(
|
|
4120
4028
|
/* webpackChunkName: "language-configuration-systemverilog" */
|
|
4121
4029
|
'./systemverilog.js').then(module => module)).default,
|
|
4122
|
-
'
|
|
4123
|
-
/* webpackChunkName: "language-configuration-
|
|
4124
|
-
'./
|
|
4125
|
-
'ucf': async () => (await import(
|
|
4126
|
-
/* webpackChunkName: "language-configuration-ucf" */
|
|
4127
|
-
'./ucf.js').then(module => module)).default,
|
|
4128
|
-
'sdc': async () => (await import(
|
|
4129
|
-
/* webpackChunkName: "language-configuration-sdc" */
|
|
4130
|
-
'./sdc.js').then(module => module)).default,
|
|
4131
|
-
'xdc': async () => (await import(
|
|
4132
|
-
/* webpackChunkName: "language-configuration-xdc" */
|
|
4133
|
-
'./xdc.js').then(module => module)).default,
|
|
4030
|
+
'verilog': async () => (await import(
|
|
4031
|
+
/* webpackChunkName: "language-configuration-verilog" */
|
|
4032
|
+
'./verilog.js').then(module => module)).default,
|
|
4134
4033
|
'postgres': async () => (await import(
|
|
4135
4034
|
/* webpackChunkName: "language-configuration-postgres" */
|
|
4136
4035
|
'./postgres.js').then(module => module)).default,
|
|
@@ -4157,52 +4056,52 @@ const loader$1 = {
|
|
|
4157
4056
|
const loader = {
|
|
4158
4057
|
'coffeescript': async () => (await import(
|
|
4159
4058
|
/* webpackChunkName: "snippet-coffeescript" */
|
|
4160
|
-
'./coffeescript-coffeescript.js').then(module => module)).default,
|
|
4059
|
+
'./coffeescript-coffeescript.code-snippets.js').then(module => module)).default,
|
|
4161
4060
|
'c': async () => (await import(
|
|
4162
4061
|
/* webpackChunkName: "snippet-c" */
|
|
4163
|
-
'./cpp-c.js').then(module => module)).default,
|
|
4062
|
+
'./cpp-c.code-snippets.js').then(module => module)).default,
|
|
4164
4063
|
'cpp': async () => (await import(
|
|
4165
4064
|
/* webpackChunkName: "snippet-cpp" */
|
|
4166
|
-
'./cpp-cpp.js').then(module => module)).default,
|
|
4065
|
+
'./cpp-cpp.code-snippets.js').then(module => module)).default,
|
|
4167
4066
|
'csharp': async () => (await import(
|
|
4168
4067
|
/* webpackChunkName: "snippet-csharp" */
|
|
4169
4068
|
'./omnisharp-csharp.js').then(module => module)).default,
|
|
4170
4069
|
'fsharp': async () => (await import(
|
|
4171
4070
|
/* webpackChunkName: "snippet-fsharp" */
|
|
4172
|
-
'./fsharp-fsharp.js').then(module => module)).default,
|
|
4071
|
+
'./fsharp-fsharp.code-snippets.js').then(module => module)).default,
|
|
4173
4072
|
'groovy': async () => (await import(
|
|
4174
4073
|
/* webpackChunkName: "snippet-groovy" */
|
|
4175
|
-
'./groovy-groovy.js').then(module => module)).default,
|
|
4074
|
+
'./groovy-groovy.code-snippets.js').then(module => module)).default,
|
|
4176
4075
|
'java': async () => (await import(
|
|
4177
4076
|
/* webpackChunkName: "snippet-java" */
|
|
4178
4077
|
'./java-java.js').then(module => module)).default,
|
|
4179
4078
|
'javascript': async () => (await import(
|
|
4180
4079
|
/* webpackChunkName: "snippet-javascript" */
|
|
4181
|
-
'./javascript-javascript.js').then(module => module)).default,
|
|
4080
|
+
'./javascript-javascript.code-snippets.js').then(module => module)).default,
|
|
4182
4081
|
'javascriptreact': async () => (await import(
|
|
4183
4082
|
/* webpackChunkName: "snippet-javascriptreact" */
|
|
4184
|
-
'./javascript-
|
|
4083
|
+
'./javascript-javascript.code-snippets.js').then(module => module)).default,
|
|
4185
4084
|
'markdown': async () => (await import(
|
|
4186
4085
|
/* webpackChunkName: "snippet-markdown" */
|
|
4187
|
-
'./markdown-basics-markdown.js').then(module => module)).default,
|
|
4086
|
+
'./markdown-basics-markdown.code-snippets.js').then(module => module)).default,
|
|
4188
4087
|
'php': async () => (await import(
|
|
4189
4088
|
/* webpackChunkName: "snippet-php" */
|
|
4190
|
-
'./php-php.js').then(module => module)).default,
|
|
4089
|
+
'./php-php.code-snippets.js').then(module => module)).default,
|
|
4191
4090
|
'powershell': async () => (await import(
|
|
4192
4091
|
/* webpackChunkName: "snippet-powershell" */
|
|
4193
|
-
'./powershell-powershell.js').then(module => module)).default,
|
|
4092
|
+
'./powershell-powershell.code-snippets.js').then(module => module)).default,
|
|
4194
4093
|
'swift': async () => (await import(
|
|
4195
4094
|
/* webpackChunkName: "snippet-swift" */
|
|
4196
|
-
'./swift-swift.js').then(module => module)).default,
|
|
4095
|
+
'./swift-swift.code-snippets.js').then(module => module)).default,
|
|
4197
4096
|
'typescript': async () => (await import(
|
|
4198
4097
|
/* webpackChunkName: "snippet-typescript" */
|
|
4199
|
-
'./typescript-basics-typescript.js').then(module => module)).default,
|
|
4098
|
+
'./typescript-basics-typescript.code-snippets.js').then(module => module)).default,
|
|
4200
4099
|
'typescriptreact': async () => (await import(
|
|
4201
4100
|
/* webpackChunkName: "snippet-typescriptreact" */
|
|
4202
|
-
'./typescript-basics-
|
|
4101
|
+
'./typescript-basics-typescript.code-snippets.js').then(module => module)).default,
|
|
4203
4102
|
'vb': async () => (await import(
|
|
4204
4103
|
/* webpackChunkName: "snippet-vb" */
|
|
4205
|
-
'./vb-vb.js').then(module => module)).default,
|
|
4104
|
+
'./vb-vb.code-snippets.js').then(module => module)).default,
|
|
4206
4105
|
'diet': async () => (await import(
|
|
4207
4106
|
/* webpackChunkName: "snippet-diet" */
|
|
4208
4107
|
'./d-diet.js').then(module => module)).default,
|
|
@@ -4211,7 +4110,7 @@ const loader = {
|
|
|
4211
4110
|
'./kotlin-kotlin.js').then(module => module)).default,
|
|
4212
4111
|
'kotlinscript': async () => (await import(
|
|
4213
4112
|
/* webpackChunkName: "snippet-kotlinscript" */
|
|
4214
|
-
'./kotlin-
|
|
4113
|
+
'./kotlin-kotlin.js').then(module => module)).default,
|
|
4215
4114
|
'reason': async () => (await import(
|
|
4216
4115
|
/* webpackChunkName: "snippet-reason" */
|
|
4217
4116
|
'./ocaml-reason.js').then(module => module)).default,
|
|
@@ -4220,40 +4119,41 @@ const loader = {
|
|
|
4220
4119
|
'./pascal-pascal.js').then(module => module)).default,
|
|
4221
4120
|
'COBOL': async () => (await import(
|
|
4222
4121
|
/* webpackChunkName: "snippet-COBOL" */
|
|
4223
|
-
'./cobol-
|
|
4122
|
+
'./cobol-snippets.js').then(module => module)).default,
|
|
4224
4123
|
'COBOL Copybook': async () => (await import(
|
|
4225
4124
|
/* webpackChunkName: "snippet-COBOL Copybook" */
|
|
4226
|
-
'./cobol-
|
|
4125
|
+
'./cobol-snippets.js').then(module => module)).default,
|
|
4227
4126
|
'elixir': async () => (await import(
|
|
4228
4127
|
/* webpackChunkName: "snippet-elixir" */
|
|
4229
|
-
'./elixir-
|
|
4128
|
+
'./elixir-snippets.js').then(module => module)).default,
|
|
4230
4129
|
'erlang': async () => (await import(
|
|
4231
4130
|
/* webpackChunkName: "snippet-erlang" */
|
|
4232
4131
|
'./erlang-erlang.js').then(module => module)).default,
|
|
4233
4132
|
'tcl': async () => (await import(
|
|
4234
4133
|
/* webpackChunkName: "snippet-tcl" */
|
|
4235
4134
|
'./tcl-tcl.js').then(module => module)).default,
|
|
4236
|
-
'verilog': async () => (await import(
|
|
4237
|
-
/* webpackChunkName: "snippet-verilog" */
|
|
4238
|
-
'./verilog-verilog.js').then(module => module)).default,
|
|
4239
4135
|
'systemverilog': async () => (await import(
|
|
4240
4136
|
/* webpackChunkName: "snippet-systemverilog" */
|
|
4241
|
-
'./
|
|
4242
|
-
'
|
|
4243
|
-
/* webpackChunkName: "snippet-
|
|
4244
|
-
'./
|
|
4137
|
+
'./svlangserver-systemverilog.js').then(module => module)).default,
|
|
4138
|
+
'verilog': async () => (await import(
|
|
4139
|
+
/* webpackChunkName: "snippet-verilog" */
|
|
4140
|
+
'./svlangserver-systemverilog.js').then(module => module)).default,
|
|
4245
4141
|
'r': async () => (await import(
|
|
4246
4142
|
/* webpackChunkName: "snippet-r" */
|
|
4247
|
-
'./vscode-R-r.js').then(module => module)).default,
|
|
4143
|
+
'./vscode-R-r-snippets.js').then(module => module)).default,
|
|
4248
4144
|
'rd': async () => (await import(
|
|
4249
4145
|
/* webpackChunkName: "snippet-rd" */
|
|
4250
|
-
'./vscode-R-
|
|
4146
|
+
'./vscode-R-r-snippets.js').then(module => module)).default,
|
|
4251
4147
|
'rmd': async () => (await import(
|
|
4252
4148
|
/* webpackChunkName: "snippet-rmd" */
|
|
4253
|
-
'./vscode-R-
|
|
4149
|
+
'./vscode-R-rmarkdown.js').then(module => module)).default
|
|
4254
4150
|
};
|
|
4255
4151
|
|
|
4256
4152
|
class SimpleSnippetService {
|
|
4153
|
+
constructor() {
|
|
4154
|
+
_defineProperty(this, "_serviceBrand", void 0);
|
|
4155
|
+
}
|
|
4156
|
+
|
|
4257
4157
|
isEnabled(snippet) {
|
|
4258
4158
|
return snippet.snippetIdentifier != null || true;
|
|
4259
4159
|
}
|
|
@@ -4294,8 +4194,30 @@ class SimpleSnippetService {
|
|
|
4294
4194
|
|
|
4295
4195
|
}
|
|
4296
4196
|
|
|
4297
|
-
const
|
|
4298
|
-
monaco.extra.
|
|
4197
|
+
const languageService$1 = monaco.extra.StandaloneServices.get(monaco.languages.ILanguageService);
|
|
4198
|
+
const languageConfigurationService = monaco.extra.StandaloneServices.get(monaco.languages.ILanguageConfigurationService);
|
|
4199
|
+
monaco.extra.setSnippetSuggestSupport(new monaco.extra.SnippetCompletionProvider(languageService$1, new SimpleSnippetService(), languageConfigurationService));
|
|
4200
|
+
|
|
4201
|
+
/* Add custom blocks parsing (for tech.io):
|
|
4202
|
+
// { [autofold]
|
|
4203
|
+
// custom block content
|
|
4204
|
+
// }
|
|
4205
|
+
*/
|
|
4206
|
+
const CUSTOM_BLOCK_BEGIN_REGEX = '^\\w*(?:\\/\\/|#).*\\{';
|
|
4207
|
+
const CUSTOM_BLOCK_END_REGEX = '^\\w*(?:\\/\\/|#).*\\}';
|
|
4208
|
+
function addCustomFoldingMarkers(configuration) {
|
|
4209
|
+
var _configuration$foldin, _configuration$foldin2;
|
|
4210
|
+
|
|
4211
|
+
const markers = (_configuration$foldin = configuration.folding) === null || _configuration$foldin === void 0 ? void 0 : _configuration$foldin.markers;
|
|
4212
|
+
return _objectSpread2(_objectSpread2({}, configuration), {}, {
|
|
4213
|
+
folding: _objectSpread2(_objectSpread2({}, (_configuration$foldin2 = configuration.folding) !== null && _configuration$foldin2 !== void 0 ? _configuration$foldin2 : {}), {}, {
|
|
4214
|
+
markers: {
|
|
4215
|
+
start: markers != null ? new RegExp(markers.start.source + '|' + CUSTOM_BLOCK_BEGIN_REGEX) : new RegExp(CUSTOM_BLOCK_BEGIN_REGEX),
|
|
4216
|
+
end: markers != null ? new RegExp(markers.end.source + '|' + CUSTOM_BLOCK_END_REGEX) : new RegExp(CUSTOM_BLOCK_END_REGEX)
|
|
4217
|
+
}
|
|
4218
|
+
})
|
|
4219
|
+
});
|
|
4220
|
+
}
|
|
4299
4221
|
|
|
4300
4222
|
const customAliases = {
|
|
4301
4223
|
csharp: ['c#'],
|
|
@@ -4309,7 +4231,7 @@ const customAliases = {
|
|
|
4309
4231
|
sql: ['mysql'],
|
|
4310
4232
|
postgres: ['postgresql', 'postgres', 'pg', 'postgre']
|
|
4311
4233
|
};
|
|
4312
|
-
const
|
|
4234
|
+
const languageService = monaco.extra.StandaloneServices.get(monaco.languages.ILanguageService);
|
|
4313
4235
|
const languagesIds = Array.from(new Set([...Object.keys(languageLoader), ...textMateLanguages.map(rawLanguage => rawLanguage.id)]));
|
|
4314
4236
|
|
|
4315
4237
|
for (const languageId of languagesIds) {
|
|
@@ -4325,9 +4247,44 @@ for (const languageId of languagesIds) {
|
|
|
4325
4247
|
aliases: [...((_textMateLanguage$ali = textMateLanguage === null || textMateLanguage === void 0 ? void 0 : textMateLanguage.aliases) !== null && _textMateLanguage$ali !== void 0 ? _textMateLanguage$ali : []), ...((_customAliases$langua = customAliases[languageId]) !== null && _customAliases$langua !== void 0 ? _customAliases$langua : [])],
|
|
4326
4248
|
mimetypes: textMateLanguage === null || textMateLanguage === void 0 ? void 0 : textMateLanguage.mimetypes
|
|
4327
4249
|
});
|
|
4250
|
+
monaco.languages.setTokenizationSupportFactory(languageId, {
|
|
4251
|
+
createTokenizationSupport: async () => {
|
|
4252
|
+
return createTextMateTokensProvider(languageId).catch(err => {
|
|
4253
|
+
const monarchLoader = languageLoader[languageId];
|
|
4254
|
+
|
|
4255
|
+
if (monarchLoader != null) {
|
|
4256
|
+
console.warn("Failed to load TextMate grammar for language ".concat(languageId, ", fallback to monarch"), err);
|
|
4257
|
+
monaco.languages.setMonarchTokensProvider(languageId, monarchLoader().then(lang => lang.language));
|
|
4258
|
+
} else {
|
|
4259
|
+
console.warn("Failed to load TextMate grammar for language ".concat(languageId, " and no fallback monarch"), err);
|
|
4260
|
+
}
|
|
4261
|
+
|
|
4262
|
+
return null;
|
|
4263
|
+
});
|
|
4264
|
+
}
|
|
4265
|
+
});
|
|
4266
|
+
}
|
|
4267
|
+
/**
|
|
4268
|
+
* Type is wrong
|
|
4269
|
+
* see https://github.com/microsoft/vscode/blob/cfad2543487c4a8e8f53b4451dbccdc1c2036f41/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.ts#L381
|
|
4270
|
+
*/
|
|
4271
|
+
|
|
4272
|
+
|
|
4273
|
+
function parseLanguageConfiguration(config) {
|
|
4274
|
+
var _config$folding;
|
|
4275
|
+
|
|
4276
|
+
const markers = (_config$folding = config.folding) === null || _config$folding === void 0 ? void 0 : _config$folding.markers;
|
|
4277
|
+
return _objectSpread2(_objectSpread2({}, config), {}, {
|
|
4278
|
+
folding: config.folding != null ? _objectSpread2(_objectSpread2({}, config.folding), {}, {
|
|
4279
|
+
markers: markers != null ? {
|
|
4280
|
+
start: new RegExp(markers.start),
|
|
4281
|
+
end: new RegExp(markers.end)
|
|
4282
|
+
} : undefined
|
|
4283
|
+
}) : undefined
|
|
4284
|
+
});
|
|
4328
4285
|
}
|
|
4329
4286
|
|
|
4330
|
-
|
|
4287
|
+
languageService.onDidEncounterLanguage(async languageId => {
|
|
4331
4288
|
if (languageId === 'plaintext') {
|
|
4332
4289
|
return;
|
|
4333
4290
|
}
|
|
@@ -4336,39 +4293,25 @@ modeService.onDidEncounterLanguage(async languageId => {
|
|
|
4336
4293
|
|
|
4337
4294
|
if (loader != null) {
|
|
4338
4295
|
loader().then(configuration => {
|
|
4339
|
-
monaco.extra.handleLanguageConfiguration(languageId, configuration);
|
|
4296
|
+
monaco.extra.handleLanguageConfiguration(languageId, addCustomFoldingMarkers(parseLanguageConfiguration(configuration)));
|
|
4340
4297
|
}).catch(error => {
|
|
4341
4298
|
console.error('Unable to load language configuration', error);
|
|
4342
4299
|
});
|
|
4343
4300
|
}
|
|
4344
|
-
|
|
4345
|
-
const textMateTokenProviderPromise = createTextMateTokensProvider(languageId).catch(err => {
|
|
4346
|
-
const monarchLoader = languageLoader[languageId];
|
|
4347
|
-
|
|
4348
|
-
if (monarchLoader != null) {
|
|
4349
|
-
console.warn("Failed to load TextMate grammar for language ".concat(languageId, ", fallback to monarch"), err);
|
|
4350
|
-
monaco.languages.setMonarchTokensProvider(languageId, monarchLoader().then(lang => lang.language));
|
|
4351
|
-
} else {
|
|
4352
|
-
console.warn("Failed to load TextMate grammar for language ".concat(languageId, " and no fallback monarch"), err);
|
|
4353
|
-
}
|
|
4354
|
-
|
|
4355
|
-
return null;
|
|
4356
|
-
});
|
|
4357
|
-
monaco.languages.setTokenizationSupport(languageId, textMateTokenProviderPromise);
|
|
4358
4301
|
});
|
|
4359
4302
|
|
|
4360
4303
|
function getMonacoLanguage(languageOrModeId) {
|
|
4361
|
-
const modeId =
|
|
4304
|
+
const modeId = languageService.getLanguageIdByLanguageName(languageOrModeId.toLowerCase());
|
|
4362
4305
|
|
|
4363
4306
|
if (modeId != null) {
|
|
4364
4307
|
return modeId;
|
|
4365
4308
|
}
|
|
4366
4309
|
|
|
4367
|
-
if (
|
|
4310
|
+
if (languageService.isRegisteredLanguageId(languageOrModeId)) {
|
|
4368
4311
|
return languageOrModeId;
|
|
4369
4312
|
}
|
|
4370
4313
|
|
|
4371
|
-
if (
|
|
4314
|
+
if (languageService.isRegisteredLanguageId(languageOrModeId.toLowerCase())) {
|
|
4372
4315
|
return languageOrModeId.toLowerCase();
|
|
4373
4316
|
}
|
|
4374
4317
|
|
|
@@ -4397,6 +4340,7 @@ var colors = {
|
|
|
4397
4340
|
"statusBar.foreground": "#20252a",
|
|
4398
4341
|
"statusBar.border": "#dadada"
|
|
4399
4342
|
};
|
|
4343
|
+
var semanticHighlighting = true;
|
|
4400
4344
|
var semanticTokenColors = {
|
|
4401
4345
|
"*.static": {
|
|
4402
4346
|
fontStyle: "italic"
|
|
@@ -5004,11 +4948,12 @@ var defaultTMTheme = {
|
|
|
5004
4948
|
$schema: $schema,
|
|
5005
4949
|
type: type,
|
|
5006
4950
|
colors: colors,
|
|
4951
|
+
semanticHighlighting: semanticHighlighting,
|
|
5007
4952
|
semanticTokenColors: semanticTokenColors,
|
|
5008
4953
|
tokenColors: tokenColors
|
|
5009
4954
|
};
|
|
5010
4955
|
|
|
5011
|
-
const ThemeClass = monaco.
|
|
4956
|
+
const ThemeClass = monaco.extra.StandaloneServices.get(monaco.editor.IStandaloneThemeService).getColorTheme().constructor;
|
|
5012
4957
|
|
|
5013
4958
|
ThemeClass.prototype.getTokenStyleMetadata = function (type, modifiers, modelLanguage, useDefault, definitions) {
|
|
5014
4959
|
const themeData = getThemeData(this.themeName);
|
|
@@ -5038,7 +4983,7 @@ configurationRegistry.registerDefaultConfigurations([{
|
|
|
5038
4983
|
configurationRegistry.registerDefaultConfigurations([{
|
|
5039
4984
|
overrides: extensions.configurationDefaults
|
|
5040
4985
|
}]);
|
|
5041
|
-
const simpleConfigurationService = monaco.
|
|
4986
|
+
const simpleConfigurationService = monaco.extra.StandaloneServices.get(monaco.extra.IConfigurationService);
|
|
5042
4987
|
const onConfigurationChanged = simpleConfigurationService.onDidChangeConfiguration;
|
|
5043
4988
|
function getConfiguration(language) {
|
|
5044
4989
|
let section = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'editor';
|
|
@@ -5104,9 +5049,11 @@ function openNewCodeEditor(model) {
|
|
|
5104
5049
|
return editor;
|
|
5105
5050
|
}
|
|
5106
5051
|
|
|
5107
|
-
class MultiEditorStandaloneCodeEditorServiceImpl extends monaco.extra.
|
|
5108
|
-
constructor(
|
|
5109
|
-
super(
|
|
5052
|
+
class MultiEditorStandaloneCodeEditorServiceImpl extends monaco.extra.StandaloneCodeEditorService {
|
|
5053
|
+
constructor(contextKeyService, themeService, modelResolverService) {
|
|
5054
|
+
super(contextKeyService, themeService);
|
|
5055
|
+
|
|
5056
|
+
_defineProperty(this, "modelResolverService", void 0);
|
|
5110
5057
|
|
|
5111
5058
|
_defineProperty(this, "handlers", []);
|
|
5112
5059
|
|
|
@@ -5138,7 +5085,7 @@ class MultiEditorStandaloneCodeEditorServiceImpl extends monaco.extra.Standalone
|
|
|
5138
5085
|
}
|
|
5139
5086
|
|
|
5140
5087
|
if (modelEditor == null) {
|
|
5141
|
-
const codeEditors = monaco.
|
|
5088
|
+
const codeEditors = monaco.extra.StandaloneServices.get(monaco.extra.ICodeEditorService).listCodeEditors();
|
|
5142
5089
|
modelEditor = codeEditors.find(editor => editor.getModel() === model);
|
|
5143
5090
|
}
|
|
5144
5091
|
|
|
@@ -5190,13 +5137,20 @@ class MultiEditorStandaloneCodeEditorServiceImpl extends monaco.extra.Standalone
|
|
|
5190
5137
|
|
|
5191
5138
|
class SimpleResolvedModel {
|
|
5192
5139
|
constructor(model, readonly) {
|
|
5193
|
-
_defineProperty(this, "disposed", false);
|
|
5194
|
-
|
|
5195
5140
|
this.model = model;
|
|
5196
5141
|
this.readonly = readonly;
|
|
5142
|
+
|
|
5143
|
+
_defineProperty(this, "_onWillDispose", void 0);
|
|
5144
|
+
|
|
5145
|
+
_defineProperty(this, "disposed", false);
|
|
5146
|
+
|
|
5197
5147
|
this._onWillDispose = new monaco.Emitter();
|
|
5198
5148
|
}
|
|
5199
5149
|
|
|
5150
|
+
getLanguageId() {
|
|
5151
|
+
return this.model.getLanguageId();
|
|
5152
|
+
}
|
|
5153
|
+
|
|
5200
5154
|
get onWillDispose() {
|
|
5201
5155
|
return this._onWillDispose.event;
|
|
5202
5156
|
}
|
|
@@ -5348,7 +5302,7 @@ class ResourceModelCollection extends monaco.extra.ReferenceCollection {
|
|
|
5348
5302
|
|
|
5349
5303
|
}
|
|
5350
5304
|
|
|
5351
|
-
class
|
|
5305
|
+
class TextModelService extends monaco.extra.StandaloneTextModelService {
|
|
5352
5306
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
5353
5307
|
constructor(modelService) {
|
|
5354
5308
|
super(modelService);
|
|
@@ -5465,7 +5419,7 @@ function setup$1(editor) {
|
|
|
5465
5419
|
label: 'Fold all autofold regions',
|
|
5466
5420
|
run: async editor => {
|
|
5467
5421
|
const foldingController = monaco.extra.FoldingController.get(editor);
|
|
5468
|
-
const foldingModelPromise = foldingController.getFoldingModel();
|
|
5422
|
+
const foldingModelPromise = foldingController === null || foldingController === void 0 ? void 0 : foldingController.getFoldingModel();
|
|
5469
5423
|
|
|
5470
5424
|
if (foldingModelPromise != null) {
|
|
5471
5425
|
return foldingModelPromise.then(foldingModel => {
|
|
@@ -5488,34 +5442,34 @@ function setup(editor) {
|
|
|
5488
5442
|
setup$1(editor);
|
|
5489
5443
|
}
|
|
5490
5444
|
|
|
5491
|
-
monaco.
|
|
5445
|
+
const configurationService = monaco.extra.StandaloneServices.get(monaco.extra.IConfigurationService);
|
|
5446
|
+
configurationService.updateValue('files.eol', '\n').catch(err => {
|
|
5492
5447
|
console.error('Unable to set file eol', err);
|
|
5493
5448
|
});
|
|
5494
|
-
|
|
5495
|
-
|
|
5449
|
+
monaco.errorHandler.setUnexpectedErrorHandler(error => {
|
|
5450
|
+
console.warn('Unexpected error', error);
|
|
5451
|
+
});
|
|
5452
|
+
const textModelService = new TextModelService(monaco.extra.StandaloneServices.get(monaco.extra.IModelService));
|
|
5453
|
+
const multiEditorStandaloneCodeEditorServiceImpl = new MultiEditorStandaloneCodeEditorServiceImpl(monaco.extra.StandaloneServices.get(monaco.extra.IContextKeyService), monaco.extra.StandaloneServices.get(monaco.editor.IStandaloneThemeService), textModelService);
|
|
5454
|
+
monaco.extra.StandaloneServices.initialize({
|
|
5455
|
+
codeEditorService: multiEditorStandaloneCodeEditorServiceImpl,
|
|
5456
|
+
textModelService
|
|
5457
|
+
});
|
|
5496
5458
|
|
|
5497
5459
|
function createEditor(domElement, options, override) {
|
|
5498
|
-
const editor = monaco.editor.create(domElement, options,
|
|
5499
|
-
codeEditorService: multiEditorStandaloneCodeEditorServiceImpl,
|
|
5500
|
-
textModelService: editorModelResolverService
|
|
5501
|
-
}, override));
|
|
5502
|
-
editorModelResolverService.setEditor(editor);
|
|
5460
|
+
const editor = monaco.editor.create(domElement, options, override);
|
|
5503
5461
|
setup(editor);
|
|
5504
5462
|
return editor;
|
|
5505
5463
|
}
|
|
5506
5464
|
|
|
5507
5465
|
function registerTextModelContentProvider(scheme, provider) {
|
|
5508
|
-
return
|
|
5466
|
+
return textModelService.registerTextModelContentProvider(scheme, provider);
|
|
5509
5467
|
}
|
|
5510
5468
|
|
|
5511
5469
|
function registerEditorOpenHandler(handler) {
|
|
5512
5470
|
return multiEditorStandaloneCodeEditorServiceImpl.registerEditorOpenHandler(handler);
|
|
5513
5471
|
}
|
|
5514
5472
|
|
|
5515
|
-
function updateKeybindings(editor, bindings) {
|
|
5516
|
-
editor._standaloneKeybindingService.setUserKeybindings(bindings);
|
|
5517
|
-
}
|
|
5518
|
-
|
|
5519
5473
|
function mapVimKeyBindings(keybindingConfig, mode) {
|
|
5520
5474
|
if (keybindingConfig != null) {
|
|
5521
5475
|
for (const item of keybindingConfig) {
|
|
@@ -5555,10 +5509,13 @@ function initVimMode(editor, statusBarElement) {
|
|
|
5555
5509
|
return monacoVim.initVimMode(editor, statusBarElement);
|
|
5556
5510
|
}
|
|
5557
5511
|
|
|
5558
|
-
|
|
5512
|
+
const keybindingService = monaco.extra.StandaloneServices.get(monaco.extra.IKeybindingService);
|
|
5513
|
+
function updateKeybindings(bindings) {
|
|
5514
|
+
keybindingService.setUserKeybindings(bindings);
|
|
5515
|
+
}
|
|
5516
|
+
function updateEditorKeybindingsMode(editor) {
|
|
5559
5517
|
let keyBindingsMode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'classic';
|
|
5560
5518
|
let statusBarElement = arguments.length > 2 ? arguments[2] : undefined;
|
|
5561
|
-
let keyBindings = arguments.length > 3 ? arguments[3] : undefined;
|
|
5562
5519
|
|
|
5563
5520
|
switch (keyBindingsMode) {
|
|
5564
5521
|
case 'vim':
|
|
@@ -5575,11 +5532,8 @@ function updateEditorKeybindings(editor) {
|
|
|
5575
5532
|
|
|
5576
5533
|
default:
|
|
5577
5534
|
{
|
|
5578
|
-
updateKeybindings(editor, keyBindings !== null && keyBindings !== void 0 ? keyBindings : []);
|
|
5579
5535
|
return {
|
|
5580
|
-
dispose: () => {
|
|
5581
|
-
updateKeybindings(editor, []);
|
|
5582
|
-
}
|
|
5536
|
+
dispose: () => {}
|
|
5583
5537
|
};
|
|
5584
5538
|
}
|
|
5585
5539
|
}
|
|
@@ -5805,4 +5759,4 @@ function hideCodeWithoutDecoration(editor, decorations) {
|
|
|
5805
5759
|
};
|
|
5806
5760
|
}
|
|
5807
5761
|
|
|
5808
|
-
export { addVSCodeTheme, createEditor, getConfiguration, getMonacoLanguage, getThemeData, hideCodeWithoutDecoration, lockCodeWithoutDecoration, onConfigurationChanged, registerConfigurations, registerDefaultConfigurations, registerEditorOpenHandler, registerTextModelContentProvider,
|
|
5762
|
+
export { addVSCodeTheme, createEditor, getConfiguration, getMonacoLanguage, getThemeData, hideCodeWithoutDecoration, lockCodeWithoutDecoration, onConfigurationChanged, registerConfigurations, registerDefaultConfigurations, registerEditorOpenHandler, registerTextModelContentProvider, updateEditorKeybindingsMode, updateKeybindings, updateUserConfiguration };
|