@codingame/monaco-languageclient-wrapper 1.0.9 → 1.1.3
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/BSV.tmLanguage.js +299 -0
- package/dist/COBOL Copybook.js +2017 -0
- package/dist/COBOL.js +2017 -0
- package/dist/COBOL.tmLanguage.js +149 -0
- package/dist/CodinGameMonacoWorkspace.d.ts +13 -0
- package/dist/Configuration.d.ts +15 -0
- package/dist/Erlang.plist.js +1752 -0
- package/dist/JSON.tmLanguage.js +221 -0
- package/dist/JSONC.tmLanguage.js +221 -0
- package/dist/JavaScript.tmLanguage.js +5894 -0
- package/dist/Kotlin.tmLanguage.js +724 -0
- package/dist/MagicPython.tmLanguage.js +5340 -0
- package/dist/MagicRegExp.tmLanguage.js +505 -0
- package/dist/Regular Expressions (JavaScript).tmLanguage.js +166 -0
- package/dist/SQL.plist.js +482 -0
- package/dist/Scala.tmLanguage.js +1255 -0
- package/dist/TypeScript.tmLanguage.js +5641 -0
- package/dist/WatchableConsoleWindow.d.ts +22 -0
- package/dist/_rollupPluginBabelHelpers.js +54 -0
- package/dist/asp-vb-net.tmlanguage.js +247 -0
- package/dist/bsv.js +49 -0
- package/dist/c.js +18 -0
- package/dist/c.tmLanguage.js +3347 -0
- package/dist/cabal.tmLanguage.js +66 -0
- package/dist/clojure.tmLanguage.js +443 -0
- package/dist/codeblock-cabal.js +42 -0
- package/dist/codeblock-haskell.js +42 -0
- package/dist/codeblock-literate-haskell.js +42 -0
- package/dist/codeblock.js +36 -0
- package/dist/codeblock2.js +95 -0
- package/dist/coffeescript.js +18 -0
- package/dist/coffeescript.tmLanguage.js +1324 -0
- package/dist/configuration/index.d.ts +5 -0
- package/dist/cpp.js +18 -0
- package/dist/cpp.tmLanguage.js +19996 -0
- package/dist/createLanguageClient.d.ts +2 -2
- package/dist/csharp.js +18 -0
- package/dist/csharp.tmLanguage.js +4750 -0
- package/dist/css.tmLanguage.js +1873 -0
- package/dist/css.worker.js +6 -0
- package/dist/cssContribution.js +10 -0
- package/dist/cuda-cpp.tmLanguage.js +19993 -0
- package/dist/d.js +3159 -0
- package/dist/dart.js +530 -0
- package/dist/diet.js +758 -0
- package/dist/diet2.js +92 -0
- package/dist/dml.js +169 -0
- package/dist/eex.js +55 -0
- package/dist/elixir.js +2341 -0
- package/dist/elixir2.js +184 -0
- package/dist/erlang.js +195 -0
- package/dist/expression.js +846 -0
- package/dist/extensions/autofold.d.ts +2 -0
- package/dist/extensions/cobol.d.ts +2 -0
- package/dist/extensions/index.d.ts +2 -0
- package/dist/features/cssContribution.d.ts +1 -0
- package/dist/features/htmlContribution.d.ts +1 -0
- package/dist/features/jsonContribution.d.ts +1 -0
- package/dist/features/typescriptContribution.d.ts +1 -0
- package/dist/fsharp.js +18 -0
- package/dist/fsharp.tmLanguage.js +1811 -0
- package/dist/go.tmLanguage.js +1025 -0
- package/dist/groovy.js +229 -0
- package/dist/groovy.tmLanguage.js +1391 -0
- package/dist/haskell.tmLanguage.js +629 -0
- package/dist/html (eex).js +31 -0
- package/dist/html-derivative.tmLanguage.js +57 -0
- package/dist/html.tmLanguage.js +2652 -0
- package/dist/html.tmLanguage2.js +97 -0
- package/dist/html.worker.js +6 -0
- package/dist/htmlContribution.js +10 -0
- package/dist/index.d.ts +3 -2
- package/dist/inline-styles.js +104 -0
- package/dist/inline-template.js +88 -0
- package/dist/java.js +18 -0
- package/dist/java.tmLanguage.js +1863 -0
- package/dist/javascript.js +196 -0
- package/dist/javascriptreact.js +196 -0
- package/dist/jsdoc.js.injection.tmLanguage.js +32 -0
- package/dist/jsdoc.ts.injection.tmLanguage.js +32 -0
- package/dist/json.worker.js +6 -0
- package/dist/jsonContribution.js +78 -0
- package/dist/keybindings/index.d.ts +2 -0
- package/dist/keybindings/keybindingHelper.d.ts +2 -0
- package/dist/keybindings/vim.d.ts +3 -0
- package/dist/kotlin.js +117 -0
- package/dist/kotlinscript.js +117 -0
- package/dist/languageClient.d.ts +8 -14
- package/dist/languages/extensions/grammarLoader.d.ts +91037 -0
- package/dist/languages/extensions/snippetLoader.d.ts +4578 -0
- package/dist/languages/index.d.ts +3 -0
- package/dist/languages/monarch/index.d.ts +7 -0
- package/dist/languages/monarch/list.d.ts +7 -0
- package/dist/languages/monarch/stub-generator.d.ts +2 -0
- package/dist/languages/snippets/index.d.ts +1 -0
- package/dist/languages/textMate/CGTMGrammarFactory.d.ts +5 -0
- package/dist/languages/textMate/TextMateTokensProvider.d.ts +11 -0
- package/dist/languages/textMate/index.d.ts +2 -0
- package/dist/literateHaskell.tmLanguage.js +70 -0
- package/dist/lua.tmLanguage.js +289 -0
- package/dist/main.js +636 -315
- package/dist/markdown.js +103 -0
- package/dist/markdown.tmLanguage.js +2784 -0
- package/dist/merlin.js +111 -0
- package/dist/monaco.d.ts +8 -0
- package/dist/objective-c.tmLanguage.js +3618 -0
- package/dist/ocaml-hover-info.js +34 -0
- package/dist/ocaml-hover-type.js +24 -0
- package/dist/ocaml-markdown-codeblock.js +42 -0
- package/dist/ocaml.js +2979 -0
- package/dist/ocamlbuild.js +239 -0
- package/dist/opam.js +149 -0
- package/dist/pascal.js +382 -0
- package/dist/pascal.tmLanguage.js +169 -0
- package/dist/perl.tmLanguage.js +2986 -0
- package/dist/perl6.tmLanguage.js +323 -0
- package/dist/pgsql.tmLanguage.js +284 -0
- package/dist/php.js +265 -0
- package/dist/php.tmLanguage.js +3791 -0
- package/dist/platform.tmLanguage.js +1135 -0
- package/dist/powershell.js +18 -0
- package/dist/powershell.tmLanguage.js +1037 -0
- package/dist/r.tmLanguage.js +551 -0
- package/dist/reason-hover-info.js +34 -0
- package/dist/reason-hover-signature.js +21 -0
- package/dist/reason-hover-type.js +21 -0
- package/dist/reason-markdown-codeblock.js +42 -0
- package/dist/reason.js +100 -0
- package/dist/ruby.tmLanguage.js +2784 -0
- package/dist/rust.tmLanguage.js +1178 -0
- package/dist/sassdoc.tmLanguage.js +362 -0
- package/dist/scss.tmLanguage.js +1887 -0
- package/dist/sdc.tmLanguage.js +712 -0
- package/dist/sdl.js +162 -0
- package/dist/services/Configuration.d.ts +2 -3
- package/dist/services/EditorModelResolverService.d.ts +8 -0
- package/dist/services/MultiEditorStandaloneCodeEditorService.d.ts +7 -0
- package/dist/services/WatchableConsoleWindow.d.ts +2 -0
- package/dist/services.d.ts +1 -2
- package/dist/shell-unix-bash.tmLanguage.js +1291 -0
- package/dist/sql.js +21 -0
- package/dist/staticOptions.d.ts +9 -0
- package/dist/stub-generator.js +15 -0
- package/dist/swift.js +183 -0
- package/dist/swift.tmLanguage.js +3288 -0
- package/dist/systemverilog.js +208 -0
- package/dist/systemverilog.tmLanguage.js +1067 -0
- package/dist/tcl.js +151 -0
- package/dist/tcl.tmlanguage.yaml.js +5484 -0
- package/dist/template.js +207 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/registry.d.ts +4 -0
- package/dist/theme/semanticHighlight.d.ts +1 -0
- package/dist/theme/tools.d.ts +13 -0
- package/dist/tools.d.ts +3 -0
- package/dist/ts.worker.js +6 -0
- package/dist/typescript.js +312 -0
- package/dist/typescriptContribution.js +36 -0
- package/dist/typescriptreact.js +312 -0
- package/dist/ucf.tmLanguage.js +36 -0
- package/dist/vb.js +88 -0
- package/dist/verilog.js +432 -0
- package/dist/verilog.tmLanguage.js +321 -0
- package/dist/worker.d.ts +6 -0
- package/dist/worker.js +54 -0
- package/dist/xml.tmLanguage.js +395 -0
- package/dist/xsl.tmLanguage.js +102 -0
- package/dist/yaml.tmLanguage.js +629 -0
- package/package.json +19 -20
- package/stats.html +1 -1
package/dist/main.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as monaco from 'monaco-editor/esm/vs/editor/edcore.main';
|
|
2
2
|
import { Uri } from 'monaco-editor/esm/vs/editor/edcore.main';
|
|
3
|
+
import '@codingame/monaco-editor-wrapper/dist/extensionConfigurations';
|
|
3
4
|
import { registerTextModelContentProvider } from '@codingame/monaco-editor-wrapper';
|
|
4
5
|
import swal from 'sweetalert';
|
|
5
6
|
import once from 'once';
|
|
@@ -300,14 +301,9 @@ function ownKeys(object, enumerableOnly) {
|
|
|
300
301
|
|
|
301
302
|
if (Object.getOwnPropertySymbols) {
|
|
302
303
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
keys.push.apply(keys, symbols);
|
|
304
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
305
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
306
|
+
})), keys.push.apply(keys, symbols);
|
|
311
307
|
}
|
|
312
308
|
|
|
313
309
|
return keys;
|
|
@@ -315,19 +311,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
315
311
|
|
|
316
312
|
function _objectSpread2(target) {
|
|
317
313
|
for (var i = 1; i < arguments.length; i++) {
|
|
318
|
-
var source = arguments[i]
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
325
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
326
|
-
} else {
|
|
327
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
328
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
329
|
-
});
|
|
330
|
-
}
|
|
314
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
315
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
316
|
+
_defineProperty(target, key, source[key]);
|
|
317
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
318
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
319
|
+
});
|
|
331
320
|
}
|
|
332
321
|
|
|
333
322
|
return target;
|
|
@@ -1007,7 +996,7 @@ var util$1 = /*#__PURE__*/Object.freeze({
|
|
|
1007
996
|
'default': util
|
|
1008
997
|
});
|
|
1009
998
|
|
|
1010
|
-
var require$$1$
|
|
999
|
+
var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(util$1);
|
|
1011
1000
|
|
|
1012
1001
|
var disposable$1 = {};
|
|
1013
1002
|
|
|
@@ -1246,7 +1235,7 @@ Object.defineProperty(ril, "__esModule", {
|
|
|
1246
1235
|
value: true
|
|
1247
1236
|
});
|
|
1248
1237
|
const ral_1$1 = ral;
|
|
1249
|
-
const util_1 = require$$1$
|
|
1238
|
+
const util_1 = require$$1$2;
|
|
1250
1239
|
const disposable_1$2 = disposable$1;
|
|
1251
1240
|
const messageBuffer_1 = messageBuffer;
|
|
1252
1241
|
|
|
@@ -7957,7 +7946,7 @@ var main$1 = /*#__PURE__*/Object.freeze({
|
|
|
7957
7946
|
get TextDocument () { return TextDocument$1; }
|
|
7958
7947
|
});
|
|
7959
7948
|
|
|
7960
|
-
var require$$1$
|
|
7949
|
+
var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(main$1);
|
|
7961
7950
|
|
|
7962
7951
|
var messages = {};
|
|
7963
7952
|
|
|
@@ -9385,7 +9374,7 @@ connection$3.createProtocolConnection = createProtocolConnection;
|
|
|
9385
9374
|
|
|
9386
9375
|
__exportStar(main$2, exports);
|
|
9387
9376
|
|
|
9388
|
-
__exportStar(require$$1$
|
|
9377
|
+
__exportStar(require$$1$1, exports);
|
|
9389
9378
|
|
|
9390
9379
|
__exportStar(messages, exports);
|
|
9391
9380
|
|
|
@@ -9464,83 +9453,61 @@ connection$3.createProtocolConnection = createProtocolConnection;
|
|
|
9464
9453
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
9465
9454
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
9466
9455
|
* ------------------------------------------------------------------------------------------ */
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
if (ar || !(i in from)) {
|
|
9470
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
9471
|
-
ar[i] = from[i];
|
|
9472
|
-
}
|
|
9473
|
-
}
|
|
9474
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9475
|
-
};
|
|
9476
|
-
var FullTextDocument = /** @class */ (function () {
|
|
9477
|
-
function FullTextDocument(uri, languageId, version, content) {
|
|
9456
|
+
class FullTextDocument {
|
|
9457
|
+
constructor(uri, languageId, version, content) {
|
|
9478
9458
|
this._uri = uri;
|
|
9479
9459
|
this._languageId = languageId;
|
|
9480
9460
|
this._version = version;
|
|
9481
9461
|
this._content = content;
|
|
9482
9462
|
this._lineOffsets = undefined;
|
|
9483
9463
|
}
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
},
|
|
9495
|
-
enumerable: false,
|
|
9496
|
-
configurable: true
|
|
9497
|
-
});
|
|
9498
|
-
Object.defineProperty(FullTextDocument.prototype, "version", {
|
|
9499
|
-
get: function () {
|
|
9500
|
-
return this._version;
|
|
9501
|
-
},
|
|
9502
|
-
enumerable: false,
|
|
9503
|
-
configurable: true
|
|
9504
|
-
});
|
|
9505
|
-
FullTextDocument.prototype.getText = function (range) {
|
|
9464
|
+
get uri() {
|
|
9465
|
+
return this._uri;
|
|
9466
|
+
}
|
|
9467
|
+
get languageId() {
|
|
9468
|
+
return this._languageId;
|
|
9469
|
+
}
|
|
9470
|
+
get version() {
|
|
9471
|
+
return this._version;
|
|
9472
|
+
}
|
|
9473
|
+
getText(range) {
|
|
9506
9474
|
if (range) {
|
|
9507
|
-
|
|
9508
|
-
|
|
9475
|
+
const start = this.offsetAt(range.start);
|
|
9476
|
+
const end = this.offsetAt(range.end);
|
|
9509
9477
|
return this._content.substring(start, end);
|
|
9510
9478
|
}
|
|
9511
9479
|
return this._content;
|
|
9512
|
-
}
|
|
9513
|
-
|
|
9514
|
-
for (
|
|
9515
|
-
var change = changes_1[_i];
|
|
9480
|
+
}
|
|
9481
|
+
update(changes, version) {
|
|
9482
|
+
for (let change of changes) {
|
|
9516
9483
|
if (FullTextDocument.isIncremental(change)) {
|
|
9517
9484
|
// makes sure start is before end
|
|
9518
|
-
|
|
9485
|
+
const range = getWellformedRange(change.range);
|
|
9519
9486
|
// update content
|
|
9520
|
-
|
|
9521
|
-
|
|
9487
|
+
const startOffset = this.offsetAt(range.start);
|
|
9488
|
+
const endOffset = this.offsetAt(range.end);
|
|
9522
9489
|
this._content = this._content.substring(0, startOffset) + change.text + this._content.substring(endOffset, this._content.length);
|
|
9523
9490
|
// update the offsets
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9491
|
+
const startLine = Math.max(range.start.line, 0);
|
|
9492
|
+
const endLine = Math.max(range.end.line, 0);
|
|
9493
|
+
let lineOffsets = this._lineOffsets;
|
|
9494
|
+
const addedLineOffsets = computeLineOffsets(change.text, false, startOffset);
|
|
9528
9495
|
if (endLine - startLine === addedLineOffsets.length) {
|
|
9529
|
-
for (
|
|
9496
|
+
for (let i = 0, len = addedLineOffsets.length; i < len; i++) {
|
|
9530
9497
|
lineOffsets[i + startLine + 1] = addedLineOffsets[i];
|
|
9531
9498
|
}
|
|
9532
9499
|
}
|
|
9533
9500
|
else {
|
|
9534
9501
|
if (addedLineOffsets.length < 10000) {
|
|
9535
|
-
lineOffsets.splice
|
|
9502
|
+
lineOffsets.splice(startLine + 1, endLine - startLine, ...addedLineOffsets);
|
|
9536
9503
|
}
|
|
9537
9504
|
else { // avoid too many arguments for splice
|
|
9538
9505
|
this._lineOffsets = lineOffsets = lineOffsets.slice(0, startLine + 1).concat(addedLineOffsets, lineOffsets.slice(endLine + 1));
|
|
9539
9506
|
}
|
|
9540
9507
|
}
|
|
9541
|
-
|
|
9508
|
+
const diff = change.text.length - (endOffset - startOffset);
|
|
9542
9509
|
if (diff !== 0) {
|
|
9543
|
-
for (
|
|
9510
|
+
for (let i = startLine + 1 + addedLineOffsets.length, len = lineOffsets.length; i < len; i++) {
|
|
9544
9511
|
lineOffsets[i] = lineOffsets[i] + diff;
|
|
9545
9512
|
}
|
|
9546
9513
|
}
|
|
@@ -9554,22 +9521,22 @@ var FullTextDocument = /** @class */ (function () {
|
|
|
9554
9521
|
}
|
|
9555
9522
|
}
|
|
9556
9523
|
this._version = version;
|
|
9557
|
-
}
|
|
9558
|
-
|
|
9524
|
+
}
|
|
9525
|
+
getLineOffsets() {
|
|
9559
9526
|
if (this._lineOffsets === undefined) {
|
|
9560
9527
|
this._lineOffsets = computeLineOffsets(this._content, true);
|
|
9561
9528
|
}
|
|
9562
9529
|
return this._lineOffsets;
|
|
9563
|
-
}
|
|
9564
|
-
|
|
9530
|
+
}
|
|
9531
|
+
positionAt(offset) {
|
|
9565
9532
|
offset = Math.max(Math.min(offset, this._content.length), 0);
|
|
9566
|
-
|
|
9567
|
-
|
|
9533
|
+
let lineOffsets = this.getLineOffsets();
|
|
9534
|
+
let low = 0, high = lineOffsets.length;
|
|
9568
9535
|
if (high === 0) {
|
|
9569
9536
|
return { line: 0, character: offset };
|
|
9570
9537
|
}
|
|
9571
9538
|
while (low < high) {
|
|
9572
|
-
|
|
9539
|
+
let mid = Math.floor((low + high) / 2);
|
|
9573
9540
|
if (lineOffsets[mid] > offset) {
|
|
9574
9541
|
high = mid;
|
|
9575
9542
|
}
|
|
@@ -9579,41 +9546,36 @@ var FullTextDocument = /** @class */ (function () {
|
|
|
9579
9546
|
}
|
|
9580
9547
|
// low is the least x for which the line offset is larger than the current offset
|
|
9581
9548
|
// or array.length if no line offset is larger than the current offset
|
|
9582
|
-
|
|
9583
|
-
return { line
|
|
9584
|
-
}
|
|
9585
|
-
|
|
9586
|
-
|
|
9549
|
+
let line = low - 1;
|
|
9550
|
+
return { line, character: offset - lineOffsets[line] };
|
|
9551
|
+
}
|
|
9552
|
+
offsetAt(position) {
|
|
9553
|
+
let lineOffsets = this.getLineOffsets();
|
|
9587
9554
|
if (position.line >= lineOffsets.length) {
|
|
9588
9555
|
return this._content.length;
|
|
9589
9556
|
}
|
|
9590
9557
|
else if (position.line < 0) {
|
|
9591
9558
|
return 0;
|
|
9592
9559
|
}
|
|
9593
|
-
|
|
9594
|
-
|
|
9560
|
+
let lineOffset = lineOffsets[position.line];
|
|
9561
|
+
let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
|
|
9595
9562
|
return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
|
|
9596
|
-
}
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
configurable: true
|
|
9603
|
-
});
|
|
9604
|
-
FullTextDocument.isIncremental = function (event) {
|
|
9605
|
-
var candidate = event;
|
|
9563
|
+
}
|
|
9564
|
+
get lineCount() {
|
|
9565
|
+
return this.getLineOffsets().length;
|
|
9566
|
+
}
|
|
9567
|
+
static isIncremental(event) {
|
|
9568
|
+
let candidate = event;
|
|
9606
9569
|
return candidate !== undefined && candidate !== null &&
|
|
9607
9570
|
typeof candidate.text === 'string' && candidate.range !== undefined &&
|
|
9608
9571
|
(candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');
|
|
9609
|
-
}
|
|
9610
|
-
|
|
9611
|
-
|
|
9572
|
+
}
|
|
9573
|
+
static isFull(event) {
|
|
9574
|
+
let candidate = event;
|
|
9612
9575
|
return candidate !== undefined && candidate !== null &&
|
|
9613
9576
|
typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;
|
|
9614
|
-
}
|
|
9615
|
-
|
|
9616
|
-
}());
|
|
9577
|
+
}
|
|
9578
|
+
}
|
|
9617
9579
|
var TextDocument;
|
|
9618
9580
|
(function (TextDocument) {
|
|
9619
9581
|
/**
|
|
@@ -9648,19 +9610,18 @@ var TextDocument;
|
|
|
9648
9610
|
}
|
|
9649
9611
|
TextDocument.update = update;
|
|
9650
9612
|
function applyEdits(document, edits) {
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9613
|
+
let text = document.getText();
|
|
9614
|
+
let sortedEdits = mergeSort(edits.map(getWellformedEdit), (a, b) => {
|
|
9615
|
+
let diff = a.range.start.line - b.range.start.line;
|
|
9654
9616
|
if (diff === 0) {
|
|
9655
9617
|
return a.range.start.character - b.range.start.character;
|
|
9656
9618
|
}
|
|
9657
9619
|
return diff;
|
|
9658
9620
|
});
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
for (
|
|
9662
|
-
|
|
9663
|
-
var startOffset = document.offsetAt(e.range.start);
|
|
9621
|
+
let lastModifiedOffset = 0;
|
|
9622
|
+
const spans = [];
|
|
9623
|
+
for (const e of sortedEdits) {
|
|
9624
|
+
let startOffset = document.offsetAt(e.range.start);
|
|
9664
9625
|
if (startOffset < lastModifiedOffset) {
|
|
9665
9626
|
throw new Error('Overlapping edit');
|
|
9666
9627
|
}
|
|
@@ -9682,16 +9643,16 @@ function mergeSort(data, compare) {
|
|
|
9682
9643
|
// sorted
|
|
9683
9644
|
return data;
|
|
9684
9645
|
}
|
|
9685
|
-
|
|
9686
|
-
|
|
9687
|
-
|
|
9646
|
+
const p = (data.length / 2) | 0;
|
|
9647
|
+
const left = data.slice(0, p);
|
|
9648
|
+
const right = data.slice(p);
|
|
9688
9649
|
mergeSort(left, compare);
|
|
9689
9650
|
mergeSort(right, compare);
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9651
|
+
let leftIdx = 0;
|
|
9652
|
+
let rightIdx = 0;
|
|
9653
|
+
let i = 0;
|
|
9693
9654
|
while (leftIdx < left.length && rightIdx < right.length) {
|
|
9694
|
-
|
|
9655
|
+
let ret = compare(left[leftIdx], right[rightIdx]);
|
|
9695
9656
|
if (ret <= 0) {
|
|
9696
9657
|
// smaller_equal -> take left to preserve order
|
|
9697
9658
|
data[i++] = left[leftIdx++];
|
|
@@ -9709,11 +9670,10 @@ function mergeSort(data, compare) {
|
|
|
9709
9670
|
}
|
|
9710
9671
|
return data;
|
|
9711
9672
|
}
|
|
9712
|
-
function computeLineOffsets(text, isAtLineStart, textOffset) {
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
var ch = text.charCodeAt(i);
|
|
9673
|
+
function computeLineOffsets(text, isAtLineStart, textOffset = 0) {
|
|
9674
|
+
const result = isAtLineStart ? [textOffset] : [];
|
|
9675
|
+
for (let i = 0; i < text.length; i++) {
|
|
9676
|
+
let ch = text.charCodeAt(i);
|
|
9717
9677
|
if (ch === 13 /* CarriageReturn */ || ch === 10 /* LineFeed */) {
|
|
9718
9678
|
if (ch === 13 /* CarriageReturn */ && i + 1 < text.length && text.charCodeAt(i + 1) === 10 /* LineFeed */) {
|
|
9719
9679
|
i++;
|
|
@@ -9724,17 +9684,17 @@ function computeLineOffsets(text, isAtLineStart, textOffset) {
|
|
|
9724
9684
|
return result;
|
|
9725
9685
|
}
|
|
9726
9686
|
function getWellformedRange(range) {
|
|
9727
|
-
|
|
9728
|
-
|
|
9687
|
+
const start = range.start;
|
|
9688
|
+
const end = range.end;
|
|
9729
9689
|
if (start.line > end.line || (start.line === end.line && start.character > end.character)) {
|
|
9730
9690
|
return { start: end, end: start };
|
|
9731
9691
|
}
|
|
9732
9692
|
return range;
|
|
9733
9693
|
}
|
|
9734
9694
|
function getWellformedEdit(textEdit) {
|
|
9735
|
-
|
|
9695
|
+
const range = getWellformedRange(textEdit.range);
|
|
9736
9696
|
if (range !== textEdit.range) {
|
|
9737
|
-
return { newText: textEdit.newText, range
|
|
9697
|
+
return { newText: textEdit.newText, range };
|
|
9738
9698
|
}
|
|
9739
9699
|
return textEdit;
|
|
9740
9700
|
}
|
|
@@ -9744,7 +9704,7 @@ var main = /*#__PURE__*/Object.freeze({
|
|
|
9744
9704
|
get TextDocument () { return TextDocument; }
|
|
9745
9705
|
});
|
|
9746
9706
|
|
|
9747
|
-
var require$$1
|
|
9707
|
+
var require$$1 = /*@__PURE__*/getAugmentedNamespace(main);
|
|
9748
9708
|
|
|
9749
9709
|
/* --------------------------------------------------------------------------------------------
|
|
9750
9710
|
* Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
@@ -9763,9 +9723,9 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
|
|
|
9763
9723
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
9764
9724
|
};
|
|
9765
9725
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9766
|
-
exports.ConfigurationTarget = exports.DocumentIdentifier = exports.VsCodeDiagnosticSeverity = exports.SignatureHelpTriggerKind = exports.isDocumentSelector = exports.Services = exports.TextDocument = exports.Emitter = exports.Event = exports.CancellationToken = exports.Disposable = void 0;
|
|
9726
|
+
exports.ConfigurationTarget = exports.DocumentIdentifier = exports.ProgressLocation = exports.VsCodeDiagnosticSeverity = exports.SignatureHelpTriggerKind = exports.isDocumentSelector = exports.Services = exports.TextDocument = exports.Emitter = exports.Event = exports.CancellationToken = exports.Disposable = void 0;
|
|
9767
9727
|
const vscode_languageserver_protocol_1 = main$3;
|
|
9768
|
-
const vscode_languageserver_textdocument_1 = require$$1
|
|
9728
|
+
const vscode_languageserver_textdocument_1 = require$$1;
|
|
9769
9729
|
Object.defineProperty(exports, "TextDocument", { enumerable: true, get: function () { return vscode_languageserver_textdocument_1.TextDocument; } });
|
|
9770
9730
|
const vscode_jsonrpc_1 = main$2;
|
|
9771
9731
|
Object.defineProperty(exports, "Disposable", { enumerable: true, get: function () { return vscode_jsonrpc_1.Disposable; } });
|
|
@@ -9810,6 +9770,11 @@ exports.isDocumentSelector = isDocumentSelector;
|
|
|
9810
9770
|
VsCodeDiagnosticSeverity[VsCodeDiagnosticSeverity["Information"] = 2] = "Information";
|
|
9811
9771
|
VsCodeDiagnosticSeverity[VsCodeDiagnosticSeverity["Hint"] = 3] = "Hint";
|
|
9812
9772
|
})(exports.VsCodeDiagnosticSeverity || (exports.VsCodeDiagnosticSeverity = {}));
|
|
9773
|
+
(function (ProgressLocation) {
|
|
9774
|
+
ProgressLocation[ProgressLocation["SourceControl"] = 1] = "SourceControl";
|
|
9775
|
+
ProgressLocation[ProgressLocation["Window"] = 10] = "Window";
|
|
9776
|
+
ProgressLocation[ProgressLocation["Notification"] = 15] = "Notification";
|
|
9777
|
+
})(exports.ProgressLocation || (exports.ProgressLocation = {}));
|
|
9813
9778
|
(function (DocumentIdentifier) {
|
|
9814
9779
|
function is(arg) {
|
|
9815
9780
|
return !!arg && ('uri' in arg) && ('languageId' in arg);
|
|
@@ -9865,9 +9830,18 @@ var connection$2 = {};
|
|
|
9865
9830
|
* Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
9866
9831
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
9867
9832
|
* ------------------------------------------------------------------------------------------ */
|
|
9833
|
+
var __awaiter$2 = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9834
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9835
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
9836
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9837
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9838
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
9839
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9840
|
+
});
|
|
9841
|
+
};
|
|
9868
9842
|
Object.defineProperty(connection$2, "__esModule", { value: true });
|
|
9869
9843
|
connection$2.createConnection = void 0;
|
|
9870
|
-
const vscode_languageserver_protocol_1$
|
|
9844
|
+
const vscode_languageserver_protocol_1$f = main$3;
|
|
9871
9845
|
const Is$4 = is$1;
|
|
9872
9846
|
function createConnection(connection, errorHandler, closeHandler) {
|
|
9873
9847
|
connection.onError((data) => { errorHandler(data[0], data[1], data[2]); });
|
|
@@ -9876,22 +9850,24 @@ function createConnection(connection, errorHandler, closeHandler) {
|
|
|
9876
9850
|
listen: () => connection.listen(),
|
|
9877
9851
|
sendRequest: (type, ...params) => connection.sendRequest(Is$4.string(type) ? type : type.method, ...params),
|
|
9878
9852
|
onRequest: (type, handler) => connection.onRequest(Is$4.string(type) ? type : type.method, handler),
|
|
9879
|
-
sendNotification: (type, params) => connection.sendNotification(Is$4.string(type) ? type : type.method, params),
|
|
9853
|
+
sendNotification: (type, params) => __awaiter$2(this, void 0, void 0, function* () { return connection.sendNotification(Is$4.string(type) ? type : type.method, params); }),
|
|
9880
9854
|
onNotification: (type, handler) => connection.onNotification(Is$4.string(type) ? type : type.method, handler),
|
|
9855
|
+
onProgress: (type, token, handler) => connection.onProgress(type, token, handler),
|
|
9856
|
+
sendProgress: (type, token, value) => __awaiter$2(this, void 0, void 0, function* () { return connection.sendProgress(type, token, value); }),
|
|
9881
9857
|
trace: (value, tracer, sendNotification = false) => connection.trace(value, tracer, sendNotification),
|
|
9882
|
-
initialize: (params) => connection.sendRequest(vscode_languageserver_protocol_1$
|
|
9883
|
-
shutdown: () => connection.sendRequest(vscode_languageserver_protocol_1$
|
|
9884
|
-
exit: () => connection.sendNotification(vscode_languageserver_protocol_1$
|
|
9885
|
-
onLogMessage: (handler) => connection.onNotification(vscode_languageserver_protocol_1$
|
|
9886
|
-
onShowMessage: (handler) => connection.onNotification(vscode_languageserver_protocol_1$
|
|
9887
|
-
onTelemetry: (handler) => connection.onNotification(vscode_languageserver_protocol_1$
|
|
9888
|
-
didChangeConfiguration: (params) => connection.sendNotification(vscode_languageserver_protocol_1$
|
|
9889
|
-
didChangeWatchedFiles: (params) => connection.sendNotification(vscode_languageserver_protocol_1$
|
|
9890
|
-
didOpenTextDocument: (params) => connection.sendNotification(vscode_languageserver_protocol_1$
|
|
9891
|
-
didChangeTextDocument: (params) => connection.sendNotification(vscode_languageserver_protocol_1$
|
|
9892
|
-
didCloseTextDocument: (params) => connection.sendNotification(vscode_languageserver_protocol_1$
|
|
9893
|
-
didSaveTextDocument: (params) => connection.sendNotification(vscode_languageserver_protocol_1$
|
|
9894
|
-
onDiagnostics: (handler) => connection.onNotification(vscode_languageserver_protocol_1$
|
|
9858
|
+
initialize: (params) => connection.sendRequest(vscode_languageserver_protocol_1$f.InitializeRequest.type, params),
|
|
9859
|
+
shutdown: () => connection.sendRequest(vscode_languageserver_protocol_1$f.ShutdownRequest.type, undefined),
|
|
9860
|
+
exit: () => __awaiter$2(this, void 0, void 0, function* () { return connection.sendNotification(vscode_languageserver_protocol_1$f.ExitNotification.type); }),
|
|
9861
|
+
onLogMessage: (handler) => connection.onNotification(vscode_languageserver_protocol_1$f.LogMessageNotification.type, handler),
|
|
9862
|
+
onShowMessage: (handler) => connection.onNotification(vscode_languageserver_protocol_1$f.ShowMessageNotification.type, handler),
|
|
9863
|
+
onTelemetry: (handler) => connection.onNotification(vscode_languageserver_protocol_1$f.TelemetryEventNotification.type, handler),
|
|
9864
|
+
didChangeConfiguration: (params) => __awaiter$2(this, void 0, void 0, function* () { return connection.sendNotification(vscode_languageserver_protocol_1$f.DidChangeConfigurationNotification.type, params); }),
|
|
9865
|
+
didChangeWatchedFiles: (params) => __awaiter$2(this, void 0, void 0, function* () { return connection.sendNotification(vscode_languageserver_protocol_1$f.DidChangeWatchedFilesNotification.type, params); }),
|
|
9866
|
+
didOpenTextDocument: (params) => __awaiter$2(this, void 0, void 0, function* () { return connection.sendNotification(vscode_languageserver_protocol_1$f.DidOpenTextDocumentNotification.type, params); }),
|
|
9867
|
+
didChangeTextDocument: (params) => __awaiter$2(this, void 0, void 0, function* () { return connection.sendNotification(vscode_languageserver_protocol_1$f.DidChangeTextDocumentNotification.type, params); }),
|
|
9868
|
+
didCloseTextDocument: (params) => __awaiter$2(this, void 0, void 0, function* () { return connection.sendNotification(vscode_languageserver_protocol_1$f.DidCloseTextDocumentNotification.type, params); }),
|
|
9869
|
+
didSaveTextDocument: (params) => __awaiter$2(this, void 0, void 0, function* () { return connection.sendNotification(vscode_languageserver_protocol_1$f.DidSaveTextDocumentNotification.type, params); }),
|
|
9870
|
+
onDiagnostics: (handler) => connection.onNotification(vscode_languageserver_protocol_1$f.PublishDiagnosticsNotification.type, handler),
|
|
9895
9871
|
dispose: () => connection.dispose(),
|
|
9896
9872
|
end: () => connection.end()
|
|
9897
9873
|
};
|
|
@@ -9904,7 +9880,7 @@ var client = {};
|
|
|
9904
9880
|
|
|
9905
9881
|
var vscodeApi = {};
|
|
9906
9882
|
|
|
9907
|
-
var LIB;LIB=(()=>{var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",o=0,i=-1,a=0,h=0;h<=t.length;++h){if(h<t.length)r=t.charCodeAt(h);else {if(47===r)break;r=47;}if(47===r){if(i===h-1||1===a);else if(i!==h-1&&2===a){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var s=n.lastIndexOf("/");if(s!==n.length-1){-1===s?(n="",o=0):o=(n=n.slice(0,s)).length-1-n.lastIndexOf("/"),i=h,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=h,a=0;continue}e&&(n.length>0?n+="/..":n="..",o=2);}else n.length>0?n+="/"+t.slice(i+1,h):n=t.slice(i+1,h),o=h-i-1;i=h,a=0;}else 46===r&&-1!==a?++a:a=-1;}return n}var n={resolve:function(){for(var t,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(n=a+"/"+n,o=47===a.charCodeAt(0));}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return ".";var n=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&o&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return ".";for(var t,r=0;r<arguments.length;++r){var o=arguments[r];e(o),o.length>0&&(void 0===t?t=o:t+="/"+o);}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return "";if((t=n.resolve(t))===(r=n.resolve(r)))return "";for(var o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var i=t.length,a=i-o,h=1;h<r.length&&47===r.charCodeAt(h);++h);for(var s=r.length-h,f=a<s?a:s,u=-1,c=0;c<=f;++c){if(c===f){if(s>f){if(47===r.charCodeAt(h+c))return r.slice(h+c+1);if(0===c)return r.slice(h+c)}else a>f&&(47===t.charCodeAt(o+c)?u=c:0===c&&(u=0));break}var l=t.charCodeAt(o+c);if(l!==r.charCodeAt(h+c))break;47===l&&(u=c);}var p="";for(c=o+u+1;c<=i;++c)c!==i&&47!==t.charCodeAt(c)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(h+u):(h+=u,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return ".";for(var r=t.charCodeAt(0),n=47===r,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return -1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return "";var h=r.length-1,s=-1;for(n=t.length-1;n>=0;--n){var f=t.charCodeAt(n);if(47===f){if(!a){o=n+1;break}}else -1===s&&(a=!1,s=n+1),h>=0&&(f===r.charCodeAt(h)?-1==--h&&(i=n):(h=-1,i=s));}return o===i?i=s:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else -1===i&&(a=!1,i=n+1);return -1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var r=-1,n=0,o=-1,i=!0,a=0,h=t.length-1;h>=0;--h){var s=t.charCodeAt(h);if(47!==s)-1===o&&(i=!1,o=h+1),46===s?-1===r?r=h:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=h+1;break}}return -1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":t.slice(r,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,o=t.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var a=-1,h=0,s=-1,f=!0,u=t.length-1,c=0;u>=n;--u)if(47!==(o=t.charCodeAt(u)))-1===s&&(f=!1,s=u+1),46===o?-1===a?a=u:1!==c&&(c=1):-1!==a&&(c=-1);else if(!f){h=u+1;break}return -1===a||-1===s||0===c||1===c&&a===s-1&&a===h+1?-1!==s&&(r.base=r.name=0===h&&i?t.slice(1,s):t.slice(h,s)):(0===h&&i?(r.name=t.slice(1,a),r.base=t.slice(1,s)):(r.name=t.slice(h,a),r.base=t.slice(h,s)),r.ext=t.slice(a,s)),h>0?r.dir=t.slice(0,h-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n;},447:(t,e,r)=>{var n;if(r.r(e),r.d(e,{URI:()=>g,Utils:()=>O}),"object"==typeof process)n="win32"===process.platform;else if("object"==typeof navigator){var o=navigator.userAgent;n=o.indexOf("Windows")>=0;}var i,a,h=(i=function(t,e){return (i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e;}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);})(t,e)},function(t,e){function r(){this.constructor=t;}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r);}),s=/^\w[\w\d+.-]*$/,f=/^\//,u=/^\/\//,c="",l="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function t(t,e,r,n,o,i){void 0===i&&(i=!1),"object"==typeof t?(this.scheme=t.scheme||c,this.authority=t.authority||c,this.path=t.path||c,this.query=t.query||c,this.fragment=t.fragment||c):(this.scheme=function(t,e){return t||e?t:"file"}(t,i),this.authority=e||c,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==l&&(e=l+e):e=l;}return e}(this.scheme,r||c),this.query=n||c,this.fragment=o||c,function(t,e){if(!t.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+t.authority+'", path: "'+t.path+'", query: "'+t.query+'", fragment: "'+t.fragment+'"}');if(t.scheme&&!s.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!f.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(u.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,i));}return t.isUri=function(e){return e instanceof t||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"function"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString},Object.defineProperty(t.prototype,"fsPath",{get:function(){return C(this,!1)},enumerable:!1,configurable:!0}),t.prototype.with=function(t){if(!t)return this;var e=t.scheme,r=t.authority,n=t.path,o=t.query,i=t.fragment;return void 0===e?e=this.scheme:null===e&&(e=c),void 0===r?r=this.authority:null===r&&(r=c),void 0===n?n=this.path:null===n&&(n=c),void 0===o?o=this.query:null===o&&(o=c),void 0===i?i=this.fragment:null===i&&(i=c),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new v(e,r,n,o,i)},t.parse=function(t,e){void 0===e&&(e=!1);var r=p.exec(t);return r?new v(r[2]||c,x(r[4]||c),x(r[5]||c),x(r[7]||c),x(r[9]||c),e):new v(c,c,c,c,c)},t.file=function(t){var e=c;if(n&&(t=t.replace(/\\/g,l)),t[0]===l&&t[1]===l){var r=t.indexOf(l,2);-1===r?(e=t.substring(2),t=l):(e=t.substring(2,r),t=t.substring(r)||l);}return new v("file",e,t,c,c)},t.from=function(t){return new v(t.scheme,t.authority,t.path,t.query,t.fragment)},t.prototype.toString=function(t){return void 0===t&&(t=!1),A(this,t)},t.prototype.toJSON=function(){return this},t.revive=function(e){if(e){if(e instanceof t)return e;var r=new v(e);return r._formatted=e.external,r._fsPath=e._sep===d?e.fsPath:null,r}return e},t}(),d=n?1:void 0,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._formatted=null,e._fsPath=null,e}return h(e,t),Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){return void 0===t&&(t=!1),t?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=d),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},e}(g),m=((a={})[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a);function y(t,e){for(var r=void 0,n=-1,o=0;o<t.length;o++){var i=t.charCodeAt(o);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||e&&47===i)-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),void 0!==r&&(r+=t.charAt(o));else {void 0===r&&(r=t.substr(0,o));var a=m[i];void 0!==a?(-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),r+=a):-1===n&&(n=o);}}return -1!==n&&(r+=encodeURIComponent(t.substring(n))),void 0!==r?r:t}function b(t){for(var e=void 0,r=0;r<t.length;r++){var n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=m[n]):void 0!==e&&(e+=t[r]);}return void 0!==e?e:t}function C(t,e){var r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?"//"+t.authority+t.path:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n&&(r=r.replace(/\//g,"\\")),r}function A(t,e){var r=e?b:y,n="",o=t.scheme,i=t.authority,a=t.path,h=t.query,s=t.fragment;if(o&&(n+=o,n+=":"),(i||"file"===o)&&(n+=l,n+=l),i){var f=i.indexOf("@");if(-1!==f){var u=i.substr(0,f);i=i.substr(f+1),-1===(f=u.indexOf(":"))?n+=r(u,!1):(n+=r(u.substr(0,f),!1),n+=":",n+=r(u.substr(f+1),!1)),n+="@";}-1===(f=(i=i.toLowerCase()).indexOf(":"))?n+=r(i,!1):(n+=r(i.substr(0,f),!1),n+=i.substr(f));}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(c=a.charCodeAt(1))>=65&&c<=90&&(a="/"+String.fromCharCode(c+32)+":"+a.substr(3));else if(a.length>=2&&58===a.charCodeAt(1)){var c;(c=a.charCodeAt(0))>=65&&c<=90&&(a=String.fromCharCode(c+32)+":"+a.substr(2));}n+=r(a,!0);}return h&&(n+="?",n+=r(h,!1)),s&&(n+="#",n+=e?s:y(s,!1)),n}function w(t){try{return decodeURIComponent(t)}catch(e){return t.length>3?t.substr(0,3)+w(t.substr(3)):t}}var _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(t){return t.match(_)?t.replace(_,(function(t){return w(t)})):t}var O,P=r(470),j=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),o=0;for(e=0;e<r;e++)for(var i=arguments[e],a=0,h=i.length;a<h;a++,o++)n[o]=i[a];return n},U=P.posix||P;!function(t){t.joinPath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t.with({path:U.join.apply(U,j([t.path],e))})},t.resolvePath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=t.path||"/";return t.with({path:U.resolve.apply(U,j([n],e))})},t.dirname=function(t){var e=U.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)?t:t.with({path:e})},t.basename=function(t){return U.basename(t.path)},t.extname=function(t){return U.extname(t.path)};}(O||(O={}));}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}return r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]});},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});},r(447)})();const{URI,Utils}=LIB;
|
|
9883
|
+
var LIB;LIB=(()=>{var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",o=0,i=-1,a=0,h=0;h<=t.length;++h){if(h<t.length)r=t.charCodeAt(h);else {if(47===r)break;r=47;}if(47===r){if(i===h-1||1===a);else if(i!==h-1&&2===a){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var s=n.lastIndexOf("/");if(s!==n.length-1){-1===s?(n="",o=0):o=(n=n.slice(0,s)).length-1-n.lastIndexOf("/"),i=h,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=h,a=0;continue}e&&(n.length>0?n+="/..":n="..",o=2);}else n.length>0?n+="/"+t.slice(i+1,h):n=t.slice(i+1,h),o=h-i-1;i=h,a=0;}else 46===r&&-1!==a?++a:a=-1;}return n}var n={resolve:function(){for(var t,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(n=a+"/"+n,o=47===a.charCodeAt(0));}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return ".";var n=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&o&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return ".";for(var t,r=0;r<arguments.length;++r){var o=arguments[r];e(o),o.length>0&&(void 0===t?t=o:t+="/"+o);}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return "";if((t=n.resolve(t))===(r=n.resolve(r)))return "";for(var o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var i=t.length,a=i-o,h=1;h<r.length&&47===r.charCodeAt(h);++h);for(var s=r.length-h,c=a<s?a:s,f=-1,u=0;u<=c;++u){if(u===c){if(s>c){if(47===r.charCodeAt(h+u))return r.slice(h+u+1);if(0===u)return r.slice(h+u)}else a>c&&(47===t.charCodeAt(o+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(o+u);if(l!==r.charCodeAt(h+u))break;47===l&&(f=u);}var p="";for(u=o+f+1;u<=i;++u)u!==i&&47!==t.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(h+f):(h+=f,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return ".";for(var r=t.charCodeAt(0),n=47===r,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return -1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return "";var h=r.length-1,s=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!a){o=n+1;break}}else -1===s&&(a=!1,s=n+1),h>=0&&(c===r.charCodeAt(h)?-1==--h&&(i=n):(h=-1,i=s));}return o===i?i=s:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else -1===i&&(a=!1,i=n+1);return -1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var r=-1,n=0,o=-1,i=!0,a=0,h=t.length-1;h>=0;--h){var s=t.charCodeAt(h);if(47!==s)-1===o&&(i=!1,o=h+1),46===s?-1===r?r=h:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=h+1;break}}return -1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":t.slice(r,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,o=t.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var a=-1,h=0,s=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(o=t.charCodeAt(f)))-1===s&&(c=!1,s=f+1),46===o?-1===a?a=f:1!==u&&(u=1):-1!==a&&(u=-1);else if(!c){h=f+1;break}return -1===a||-1===s||0===u||1===u&&a===s-1&&a===h+1?-1!==s&&(r.base=r.name=0===h&&i?t.slice(1,s):t.slice(h,s)):(0===h&&i?(r.name=t.slice(1,a),r.base=t.slice(1,s)):(r.name=t.slice(h,a),r.base=t.slice(h,s)),r.ext=t.slice(a,s)),h>0?r.dir=t.slice(0,h-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n;},447:(t,e,r)=>{var n;if(r.r(e),r.d(e,{URI:()=>d,Utils:()=>P}),"object"==typeof process)n="win32"===process.platform;else if("object"==typeof navigator){var o=navigator.userAgent;n=o.indexOf("Windows")>=0;}var i,a,h=(i=function(t,e){return (i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e;}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t;}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r);}),s=/^\w[\w\d+.-]*$/,c=/^\//,f=/^\/\//;function u(t,e){if(!t.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(t.authority,'", path: "').concat(t.path,'", query: "').concat(t.query,'", fragment: "').concat(t.fragment,'"}'));if(t.scheme&&!s.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!c.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(f.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}var l="",p="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,d=function(){function t(t,e,r,n,o,i){void 0===i&&(i=!1),"object"==typeof t?(this.scheme=t.scheme||l,this.authority=t.authority||l,this.path=t.path||l,this.query=t.query||l,this.fragment=t.fragment||l):(this.scheme=function(t,e){return t||e?t:"file"}(t,i),this.authority=e||l,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==p&&(e=p+e):e=p;}return e}(this.scheme,r||l),this.query=n||l,this.fragment=o||l,u(this,i));}return t.isUri=function(e){return e instanceof t||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString},Object.defineProperty(t.prototype,"fsPath",{get:function(){return A(this,!1)},enumerable:!1,configurable:!0}),t.prototype.with=function(t){if(!t)return this;var e=t.scheme,r=t.authority,n=t.path,o=t.query,i=t.fragment;return void 0===e?e=this.scheme:null===e&&(e=l),void 0===r?r=this.authority:null===r&&(r=l),void 0===n?n=this.path:null===n&&(n=l),void 0===o?o=this.query:null===o&&(o=l),void 0===i?i=this.fragment:null===i&&(i=l),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new y(e,r,n,o,i)},t.parse=function(t,e){void 0===e&&(e=!1);var r=g.exec(t);return r?new y(r[2]||l,O(r[4]||l),O(r[5]||l),O(r[7]||l),O(r[9]||l),e):new y(l,l,l,l,l)},t.file=function(t){var e=l;if(n&&(t=t.replace(/\\/g,p)),t[0]===p&&t[1]===p){var r=t.indexOf(p,2);-1===r?(e=t.substring(2),t=p):(e=t.substring(2,r),t=t.substring(r)||p);}return new y("file",e,t,l,l)},t.from=function(t){var e=new y(t.scheme,t.authority,t.path,t.query,t.fragment);return u(e,!0),e},t.prototype.toString=function(t){return void 0===t&&(t=!1),w(this,t)},t.prototype.toJSON=function(){return this},t.revive=function(e){if(e){if(e instanceof t)return e;var r=new y(e);return r._formatted=e.external,r._fsPath=e._sep===v?e.fsPath:null,r}return e},t}(),v=n?1:void 0,y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._formatted=null,e._fsPath=null,e}return h(e,t),Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=A(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){return void 0===t&&(t=!1),t?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=v),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},e}(d),m=((a={})[58]="%3A",a[47]="%2F",a[63]="%3F",a[35]="%23",a[91]="%5B",a[93]="%5D",a[64]="%40",a[33]="%21",a[36]="%24",a[38]="%26",a[39]="%27",a[40]="%28",a[41]="%29",a[42]="%2A",a[43]="%2B",a[44]="%2C",a[59]="%3B",a[61]="%3D",a[32]="%20",a);function b(t,e){for(var r=void 0,n=-1,o=0;o<t.length;o++){var i=t.charCodeAt(o);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||e&&47===i)-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),void 0!==r&&(r+=t.charAt(o));else {void 0===r&&(r=t.substr(0,o));var a=m[i];void 0!==a?(-1!==n&&(r+=encodeURIComponent(t.substring(n,o)),n=-1),r+=a):-1===n&&(n=o);}}return -1!==n&&(r+=encodeURIComponent(t.substring(n))),void 0!==r?r:t}function C(t){for(var e=void 0,r=0;r<t.length;r++){var n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=m[n]):void 0!==e&&(e+=t[r]);}return void 0!==e?e:t}function A(t,e){var r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?"//".concat(t.authority).concat(t.path):47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n&&(r=r.replace(/\//g,"\\")),r}function w(t,e){var r=e?C:b,n="",o=t.scheme,i=t.authority,a=t.path,h=t.query,s=t.fragment;if(o&&(n+=o,n+=":"),(i||"file"===o)&&(n+=p,n+=p),i){var c=i.indexOf("@");if(-1!==c){var f=i.substr(0,c);i=i.substr(c+1),-1===(c=f.indexOf(":"))?n+=r(f,!1):(n+=r(f.substr(0,c),!1),n+=":",n+=r(f.substr(c+1),!1)),n+="@";}-1===(c=(i=i.toLowerCase()).indexOf(":"))?n+=r(i,!1):(n+=r(i.substr(0,c),!1),n+=i.substr(c));}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(u=a.charCodeAt(1))>=65&&u<=90&&(a="/".concat(String.fromCharCode(u+32),":").concat(a.substr(3)));else if(a.length>=2&&58===a.charCodeAt(1)){var u;(u=a.charCodeAt(0))>=65&&u<=90&&(a="".concat(String.fromCharCode(u+32),":").concat(a.substr(2)));}n+=r(a,!0);}return h&&(n+="?",n+=r(h,!1)),s&&(n+="#",n+=e?s:b(s,!1)),n}function x(t){try{return decodeURIComponent(t)}catch(e){return t.length>3?t.substr(0,3)+x(t.substr(3)):t}}var _=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function O(t){return t.match(_)?t.replace(_,(function(t){return x(t)})):t}var P,j=r(470),U=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},I=j.posix||j;!function(t){t.joinPath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t.with({path:I.join.apply(I,U([t.path],e,!1))})},t.resolvePath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=t.path||"/";return t.with({path:I.resolve.apply(I,U([n],e,!1))})},t.dirname=function(t){var e=I.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)?t:t.with({path:e})},t.basename=function(t){return I.basename(t.path)},t.extname=function(t){return I.extname(t.path)};}(P||(P={}));}},e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}return r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]});},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});},r(447)})();const{URI,Utils}=LIB;
|
|
9908
9884
|
|
|
9909
9885
|
var esm = /*#__PURE__*/Object.freeze({
|
|
9910
9886
|
__proto__: null,
|
|
@@ -9912,7 +9888,7 @@ var esm = /*#__PURE__*/Object.freeze({
|
|
|
9912
9888
|
Utils: Utils
|
|
9913
9889
|
});
|
|
9914
9890
|
|
|
9915
|
-
var require$$
|
|
9891
|
+
var require$$0 = /*@__PURE__*/getAugmentedNamespace(esm);
|
|
9916
9892
|
|
|
9917
9893
|
/* --------------------------------------------------------------------------------------------
|
|
9918
9894
|
* Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
@@ -9929,12 +9905,11 @@ var __awaiter$1 = (commonjsGlobal && commonjsGlobal.__awaiter) || function (this
|
|
|
9929
9905
|
};
|
|
9930
9906
|
Object.defineProperty(vscodeApi, "__esModule", { value: true });
|
|
9931
9907
|
vscodeApi.createVSCodeApi = void 0;
|
|
9932
|
-
const
|
|
9933
|
-
const vscode_uri_1 = require$$1;
|
|
9908
|
+
const vscode_uri_1 = require$$0;
|
|
9934
9909
|
const disposable_1$1 = disposable$2;
|
|
9935
9910
|
const services_1$3 = services$1;
|
|
9936
9911
|
const ServicesModule = services$1;
|
|
9937
|
-
const vscode_languageserver_protocol_1$
|
|
9912
|
+
const vscode_languageserver_protocol_1$e = main$3;
|
|
9938
9913
|
function createVSCodeApi(servicesProvider) {
|
|
9939
9914
|
const unsupported = () => { throw new Error('unsupported'); };
|
|
9940
9915
|
const Uri = class VSCodeUri extends vscode_uri_1.URI {
|
|
@@ -9984,7 +9959,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
9984
9959
|
CodeActionKind.SourceOrganizeImports = CodeActionKind.Source.append('organizeImports');
|
|
9985
9960
|
CodeActionKind.SourceFixAll = CodeActionKind.Source.append('fixAll');
|
|
9986
9961
|
class Diagnostic {
|
|
9987
|
-
constructor(range, message, severity = vscode_languageserver_protocol_1$
|
|
9962
|
+
constructor(range, message, severity = vscode_languageserver_protocol_1$e.DiagnosticSeverity.Error) {
|
|
9988
9963
|
this.range = range;
|
|
9989
9964
|
this.message = message;
|
|
9990
9965
|
this.severity = severity;
|
|
@@ -10280,7 +10255,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10280
10255
|
}
|
|
10281
10256
|
const languages = {
|
|
10282
10257
|
match(selector, document) {
|
|
10283
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10258
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10284
10259
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10285
10260
|
}
|
|
10286
10261
|
if (!services_1$3.DocumentIdentifier.is(document)) {
|
|
@@ -10301,7 +10276,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10301
10276
|
return new ApiDiagnosticCollection(name);
|
|
10302
10277
|
},
|
|
10303
10278
|
registerCompletionItemProvider(selector, provider, ...triggerCharacters) {
|
|
10304
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10279
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10305
10280
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10306
10281
|
}
|
|
10307
10282
|
const { languages } = servicesProvider();
|
|
@@ -10321,7 +10296,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10321
10296
|
}, ...triggerCharacters);
|
|
10322
10297
|
},
|
|
10323
10298
|
registerCodeActionsProvider(selector, provider) {
|
|
10324
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10299
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10325
10300
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10326
10301
|
}
|
|
10327
10302
|
const { languages } = servicesProvider();
|
|
@@ -10338,7 +10313,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10338
10313
|
});
|
|
10339
10314
|
},
|
|
10340
10315
|
registerCodeLensProvider(selector, provider) {
|
|
10341
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10316
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10342
10317
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10343
10318
|
}
|
|
10344
10319
|
const { languages } = servicesProvider();
|
|
@@ -10356,7 +10331,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10356
10331
|
});
|
|
10357
10332
|
},
|
|
10358
10333
|
registerDefinitionProvider(selector, provider) {
|
|
10359
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10334
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10360
10335
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10361
10336
|
}
|
|
10362
10337
|
const { languages } = servicesProvider();
|
|
@@ -10370,7 +10345,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10370
10345
|
});
|
|
10371
10346
|
},
|
|
10372
10347
|
registerImplementationProvider(selector, provider) {
|
|
10373
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10348
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10374
10349
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10375
10350
|
}
|
|
10376
10351
|
const { languages } = servicesProvider();
|
|
@@ -10384,7 +10359,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10384
10359
|
});
|
|
10385
10360
|
},
|
|
10386
10361
|
registerTypeDefinitionProvider(selector, provider) {
|
|
10387
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10362
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10388
10363
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10389
10364
|
}
|
|
10390
10365
|
const { languages } = servicesProvider();
|
|
@@ -10398,7 +10373,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10398
10373
|
});
|
|
10399
10374
|
},
|
|
10400
10375
|
registerDeclarationProvider(selector, provider) {
|
|
10401
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10376
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10402
10377
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10403
10378
|
}
|
|
10404
10379
|
const { languages } = servicesProvider();
|
|
@@ -10412,7 +10387,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10412
10387
|
});
|
|
10413
10388
|
},
|
|
10414
10389
|
registerHoverProvider(selector, provider) {
|
|
10415
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10390
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10416
10391
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10417
10392
|
}
|
|
10418
10393
|
const { languages } = servicesProvider();
|
|
@@ -10426,7 +10401,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10426
10401
|
return disposable_1$1.Disposable.create(() => { });
|
|
10427
10402
|
},
|
|
10428
10403
|
registerDocumentHighlightProvider(selector, provider) {
|
|
10429
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10404
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10430
10405
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10431
10406
|
}
|
|
10432
10407
|
const { languages } = servicesProvider();
|
|
@@ -10440,7 +10415,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10440
10415
|
});
|
|
10441
10416
|
},
|
|
10442
10417
|
registerDocumentSymbolProvider(selector, provider) {
|
|
10443
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10418
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10444
10419
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10445
10420
|
}
|
|
10446
10421
|
const { languages } = servicesProvider();
|
|
@@ -10465,7 +10440,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10465
10440
|
});
|
|
10466
10441
|
},
|
|
10467
10442
|
registerReferenceProvider(selector, provider) {
|
|
10468
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10443
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10469
10444
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10470
10445
|
}
|
|
10471
10446
|
const { languages } = servicesProvider();
|
|
@@ -10479,7 +10454,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10479
10454
|
});
|
|
10480
10455
|
},
|
|
10481
10456
|
registerRenameProvider(selector, provider) {
|
|
10482
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10457
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10483
10458
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10484
10459
|
}
|
|
10485
10460
|
const { languages } = servicesProvider();
|
|
@@ -10493,7 +10468,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10493
10468
|
});
|
|
10494
10469
|
},
|
|
10495
10470
|
registerDocumentFormattingEditProvider(selector, provider) {
|
|
10496
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10471
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10497
10472
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10498
10473
|
}
|
|
10499
10474
|
const { languages } = servicesProvider();
|
|
@@ -10507,7 +10482,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10507
10482
|
});
|
|
10508
10483
|
},
|
|
10509
10484
|
registerDocumentRangeFormattingEditProvider(selector, provider) {
|
|
10510
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10485
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10511
10486
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10512
10487
|
}
|
|
10513
10488
|
const { languages } = servicesProvider();
|
|
@@ -10521,7 +10496,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10521
10496
|
});
|
|
10522
10497
|
},
|
|
10523
10498
|
registerOnTypeFormattingEditProvider(selector, provider, firstTriggerCharacter, ...moreTriggerCharacter) {
|
|
10524
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10499
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10525
10500
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10526
10501
|
}
|
|
10527
10502
|
const { languages } = servicesProvider();
|
|
@@ -10535,7 +10510,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10535
10510
|
}, firstTriggerCharacter, ...moreTriggerCharacter);
|
|
10536
10511
|
},
|
|
10537
10512
|
registerSignatureHelpProvider(selector, provider, firstItem, ...remaining) {
|
|
10538
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10513
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10539
10514
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10540
10515
|
}
|
|
10541
10516
|
const { languages } = servicesProvider();
|
|
@@ -10560,7 +10535,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10560
10535
|
});
|
|
10561
10536
|
},
|
|
10562
10537
|
registerDocumentLinkProvider(selector, provider) {
|
|
10563
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10538
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10564
10539
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10565
10540
|
}
|
|
10566
10541
|
const { languages } = servicesProvider();
|
|
@@ -10578,7 +10553,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10578
10553
|
});
|
|
10579
10554
|
},
|
|
10580
10555
|
registerColorProvider(selector, provider) {
|
|
10581
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10556
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10582
10557
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10583
10558
|
}
|
|
10584
10559
|
const { languages } = servicesProvider();
|
|
@@ -10598,7 +10573,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10598
10573
|
});
|
|
10599
10574
|
},
|
|
10600
10575
|
registerFoldingRangeProvider(selector, provider) {
|
|
10601
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10576
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10602
10577
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10603
10578
|
}
|
|
10604
10579
|
const { languages } = servicesProvider();
|
|
@@ -10612,7 +10587,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10612
10587
|
});
|
|
10613
10588
|
},
|
|
10614
10589
|
registerSelectionRangeProvider(selector, provider) {
|
|
10615
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10590
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10616
10591
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10617
10592
|
}
|
|
10618
10593
|
const { languages } = servicesProvider();
|
|
@@ -10627,7 +10602,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10627
10602
|
},
|
|
10628
10603
|
registerEvaluatableExpressionProvider: unsupported,
|
|
10629
10604
|
registerDocumentSemanticTokensProvider(selector, provider, legend) {
|
|
10630
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10605
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10631
10606
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10632
10607
|
}
|
|
10633
10608
|
const { languages } = servicesProvider();
|
|
@@ -10635,6 +10610,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10635
10610
|
return disposable_1$1.Disposable.create(() => { });
|
|
10636
10611
|
}
|
|
10637
10612
|
return languages.registerDocumentSemanticTokensProvider(selector, {
|
|
10613
|
+
onDidChange: provider.onDidChangeSemanticTokens,
|
|
10638
10614
|
provideDocumentSemanticTokens({ textDocument }, token) {
|
|
10639
10615
|
return provider.provideDocumentSemanticTokens(textDocument, token);
|
|
10640
10616
|
},
|
|
@@ -10644,7 +10620,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10644
10620
|
}, legend);
|
|
10645
10621
|
},
|
|
10646
10622
|
registerDocumentRangeSemanticTokensProvider(selector, provider, legend) {
|
|
10647
|
-
if (!services_1$3.isDocumentSelector(selector)) {
|
|
10623
|
+
if (!(0, services_1$3.isDocumentSelector)(selector)) {
|
|
10648
10624
|
throw new Error('unexpected selector: ' + JSON.stringify(selector));
|
|
10649
10625
|
}
|
|
10650
10626
|
const { languages } = servicesProvider();
|
|
@@ -10707,7 +10683,7 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10707
10683
|
if (window && window.withProgress) {
|
|
10708
10684
|
return window.withProgress(options, task);
|
|
10709
10685
|
}
|
|
10710
|
-
return task({ report: () => { } }, new
|
|
10686
|
+
return task({ report: () => { } }, new vscode_languageserver_protocol_1$e.CancellationTokenSource().token);
|
|
10711
10687
|
},
|
|
10712
10688
|
showTextDocument: unsupported,
|
|
10713
10689
|
createTextEditorDecorationType: unsupported,
|
|
@@ -10834,7 +10810,9 @@ function createVSCodeApi(servicesProvider) {
|
|
|
10834
10810
|
Disposable: CodeDisposable,
|
|
10835
10811
|
SignatureHelpTriggerKind: services_1$3.SignatureHelpTriggerKind,
|
|
10836
10812
|
DiagnosticSeverity: ServicesModule.DiagnosticSeverity,
|
|
10837
|
-
EventEmitter: ServicesModule.Emitter
|
|
10813
|
+
EventEmitter: ServicesModule.Emitter,
|
|
10814
|
+
CancellationTokenSource: vscode_languageserver_protocol_1$e.CancellationTokenSource,
|
|
10815
|
+
ProgressLocation: ServicesModule.ProgressLocation
|
|
10838
10816
|
};
|
|
10839
10817
|
return partialApi;
|
|
10840
10818
|
}
|
|
@@ -10846,7 +10824,7 @@ vscodeApi.createVSCodeApi = createVSCodeApi;
|
|
|
10846
10824
|
* ------------------------------------------------------------------------------------------ */
|
|
10847
10825
|
const vscode_api_1 = vscodeApi;
|
|
10848
10826
|
const services_1$2 = services$1;
|
|
10849
|
-
var vscodeCompatibility = vscode_api_1.createVSCodeApi(services_1$2.Services.get);
|
|
10827
|
+
var vscodeCompatibility = (0, vscode_api_1.createVSCodeApi)(services_1$2.Services.get);
|
|
10850
10828
|
|
|
10851
10829
|
var configuration = {};
|
|
10852
10830
|
|
|
@@ -10861,7 +10839,7 @@ Object.defineProperty(configuration, "__esModule", {
|
|
|
10861
10839
|
});
|
|
10862
10840
|
configuration.toJSONObject = configuration.ConfigurationFeature = void 0;
|
|
10863
10841
|
const vscode_1$8 = vscodeCompatibility;
|
|
10864
|
-
const vscode_languageserver_protocol_1$
|
|
10842
|
+
const vscode_languageserver_protocol_1$d = main$3;
|
|
10865
10843
|
|
|
10866
10844
|
class ConfigurationFeature {
|
|
10867
10845
|
constructor(_client) {
|
|
@@ -10875,7 +10853,7 @@ class ConfigurationFeature {
|
|
|
10875
10853
|
|
|
10876
10854
|
initialize() {
|
|
10877
10855
|
let client = this._client;
|
|
10878
|
-
client.onRequest(vscode_languageserver_protocol_1$
|
|
10856
|
+
client.onRequest(vscode_languageserver_protocol_1$d.ConfigurationRequest.type, (params, token) => {
|
|
10879
10857
|
let configuration = params => {
|
|
10880
10858
|
let result = [];
|
|
10881
10859
|
|
|
@@ -11206,7 +11184,7 @@ const protocolDocumentLink_1$1 = protocolDocumentLink;
|
|
|
11206
11184
|
const protocolCodeAction_1$1 = protocolCodeAction;
|
|
11207
11185
|
const protocolDiagnostic_1$1 = protocolDiagnostic;
|
|
11208
11186
|
const protocolCallHierarchyItem_1$1 = protocolCallHierarchyItem;
|
|
11209
|
-
const vscode_languageserver_protocol_1$
|
|
11187
|
+
const vscode_languageserver_protocol_1$c = main$3;
|
|
11210
11188
|
var InsertReplaceRange;
|
|
11211
11189
|
|
|
11212
11190
|
(function (InsertReplaceRange) {
|
|
@@ -11795,7 +11773,7 @@ function createConverter$1(uriConverter) {
|
|
|
11795
11773
|
}
|
|
11796
11774
|
|
|
11797
11775
|
if (result.insertTextMode === undefined && item.keepWhitespace === true) {
|
|
11798
|
-
result.insertTextMode = vscode_languageserver_protocol_1$
|
|
11776
|
+
result.insertTextMode = vscode_languageserver_protocol_1$c.InsertTextMode.adjustIndentation;
|
|
11799
11777
|
}
|
|
11800
11778
|
|
|
11801
11779
|
return result;
|
|
@@ -12119,7 +12097,7 @@ const protocolDocumentLink_1 = protocolDocumentLink;
|
|
|
12119
12097
|
const protocolCodeAction_1 = protocolCodeAction;
|
|
12120
12098
|
const protocolDiagnostic_1 = protocolDiagnostic;
|
|
12121
12099
|
const protocolCallHierarchyItem_1 = protocolCallHierarchyItem;
|
|
12122
|
-
const vscode_languageserver_protocol_1$
|
|
12100
|
+
const vscode_languageserver_protocol_1$b = main$3;
|
|
12123
12101
|
var CodeBlock;
|
|
12124
12102
|
|
|
12125
12103
|
(function (CodeBlock) {
|
|
@@ -12460,7 +12438,7 @@ function createConverter(uriConverter, trustMarkdown) {
|
|
|
12460
12438
|
if (item.insertTextMode !== undefined) {
|
|
12461
12439
|
result.insertTextMode = item.insertTextMode;
|
|
12462
12440
|
|
|
12463
|
-
if (item.insertTextMode === vscode_languageserver_protocol_1$
|
|
12441
|
+
if (item.insertTextMode === vscode_languageserver_protocol_1$b.InsertTextMode.asIs) {
|
|
12464
12442
|
result.keepWhitespace = true;
|
|
12465
12443
|
}
|
|
12466
12444
|
}
|
|
@@ -12953,7 +12931,7 @@ function createConverter(uriConverter, trustMarkdown) {
|
|
|
12953
12931
|
const uri = _uriConverter(change.textDocument.uri);
|
|
12954
12932
|
|
|
12955
12933
|
for (const edit of change.edits) {
|
|
12956
|
-
if (vscode_languageserver_protocol_1$
|
|
12934
|
+
if (vscode_languageserver_protocol_1$b.AnnotatedTextEdit.is(edit)) {
|
|
12957
12935
|
result.replace(uri, asRange(edit.range), edit.newText, asMetadata(edit.annotationId));
|
|
12958
12936
|
} else {
|
|
12959
12937
|
result.replace(uri, asRange(edit.range), edit.newText);
|
|
@@ -13258,7 +13236,7 @@ Object.defineProperty(async, "__esModule", {
|
|
|
13258
13236
|
value: true
|
|
13259
13237
|
});
|
|
13260
13238
|
async.Delayer = void 0;
|
|
13261
|
-
const vscode_languageserver_protocol_1$
|
|
13239
|
+
const vscode_languageserver_protocol_1$a = main$3;
|
|
13262
13240
|
|
|
13263
13241
|
class Delayer {
|
|
13264
13242
|
constructor(defaultDelay) {
|
|
@@ -13290,7 +13268,7 @@ class Delayer {
|
|
|
13290
13268
|
}
|
|
13291
13269
|
|
|
13292
13270
|
if (delay >= 0 || this.timeout === void 0) {
|
|
13293
|
-
this.timeout = vscode_languageserver_protocol_1$
|
|
13271
|
+
this.timeout = vscode_languageserver_protocol_1$a.RAL().timer.setTimeout(() => {
|
|
13294
13272
|
this.timeout = undefined;
|
|
13295
13273
|
this.onSuccess(undefined);
|
|
13296
13274
|
}, delay >= 0 ? delay : this.defaultDelay);
|
|
@@ -13323,7 +13301,7 @@ class Delayer {
|
|
|
13323
13301
|
|
|
13324
13302
|
cancelTimeout() {
|
|
13325
13303
|
if (this.timeout !== void 0) {
|
|
13326
|
-
vscode_languageserver_protocol_1$
|
|
13304
|
+
vscode_languageserver_protocol_1$a.RAL().timer.clearTimeout(this.timeout);
|
|
13327
13305
|
this.timeout = undefined;
|
|
13328
13306
|
}
|
|
13329
13307
|
}
|
|
@@ -13429,7 +13407,7 @@ Object.defineProperty(progressPart, "__esModule", {
|
|
|
13429
13407
|
});
|
|
13430
13408
|
progressPart.ProgressPart = void 0;
|
|
13431
13409
|
const vscode_1$7 = vscodeCompatibility;
|
|
13432
|
-
const vscode_languageserver_protocol_1$
|
|
13410
|
+
const vscode_languageserver_protocol_1$9 = main$3;
|
|
13433
13411
|
const Is$1 = is;
|
|
13434
13412
|
|
|
13435
13413
|
class ProgressPart {
|
|
@@ -13437,7 +13415,7 @@ class ProgressPart {
|
|
|
13437
13415
|
this._client = _client;
|
|
13438
13416
|
this._token = _token;
|
|
13439
13417
|
this._reported = 0;
|
|
13440
|
-
this._disposable = this._client.onProgress(vscode_languageserver_protocol_1$
|
|
13418
|
+
this._disposable = this._client.onProgress(vscode_languageserver_protocol_1$9.WorkDoneProgress.type, this._token, value => {
|
|
13441
13419
|
switch (value.kind) {
|
|
13442
13420
|
case 'begin':
|
|
13443
13421
|
this.begin(value);
|
|
@@ -13467,7 +13445,7 @@ class ProgressPart {
|
|
|
13467
13445
|
this._cancellationToken = cancellationToken;
|
|
13468
13446
|
|
|
13469
13447
|
this._cancellationToken.onCancellationRequested(() => {
|
|
13470
|
-
this._client.sendNotification(vscode_languageserver_protocol_1$
|
|
13448
|
+
this._client.sendNotification(vscode_languageserver_protocol_1$9.WorkDoneProgressCancelNotification.type, {
|
|
13471
13449
|
token: this._token
|
|
13472
13450
|
});
|
|
13473
13451
|
});
|
|
@@ -16795,10 +16773,10 @@ Object.defineProperty(typeDefinition, "__esModule", {
|
|
|
16795
16773
|
});
|
|
16796
16774
|
typeDefinition.TypeDefinitionFeature = void 0;
|
|
16797
16775
|
const vscode_1$6 = vscodeCompatibility;
|
|
16798
|
-
const vscode_languageserver_protocol_1$
|
|
16776
|
+
const vscode_languageserver_protocol_1$8 = main$3;
|
|
16799
16777
|
const client_1$6 = client;
|
|
16800
16778
|
|
|
16801
|
-
function ensure$
|
|
16779
|
+
function ensure$7(target, key) {
|
|
16802
16780
|
if (target[key] === void 0) {
|
|
16803
16781
|
target[key] = {};
|
|
16804
16782
|
}
|
|
@@ -16808,12 +16786,12 @@ function ensure$6(target, key) {
|
|
|
16808
16786
|
|
|
16809
16787
|
class TypeDefinitionFeature extends client_1$6.TextDocumentFeature {
|
|
16810
16788
|
constructor(client) {
|
|
16811
|
-
super(client, vscode_languageserver_protocol_1$
|
|
16789
|
+
super(client, vscode_languageserver_protocol_1$8.TypeDefinitionRequest.type);
|
|
16812
16790
|
}
|
|
16813
16791
|
|
|
16814
16792
|
fillClientCapabilities(capabilities) {
|
|
16815
|
-
ensure$
|
|
16816
|
-
let typeDefinitionSupport = ensure$
|
|
16793
|
+
ensure$7(ensure$7(capabilities, 'textDocument'), 'typeDefinition').dynamicRegistration = true;
|
|
16794
|
+
let typeDefinitionSupport = ensure$7(ensure$7(capabilities, 'textDocument'), 'typeDefinition');
|
|
16817
16795
|
typeDefinitionSupport.dynamicRegistration = true;
|
|
16818
16796
|
typeDefinitionSupport.linkSupport = true;
|
|
16819
16797
|
}
|
|
@@ -16837,8 +16815,8 @@ class TypeDefinitionFeature extends client_1$6.TextDocumentFeature {
|
|
|
16837
16815
|
const client = this._client;
|
|
16838
16816
|
|
|
16839
16817
|
const provideTypeDefinition = (document, position, token) => {
|
|
16840
|
-
return client.sendRequest(vscode_languageserver_protocol_1$
|
|
16841
|
-
return client.handleFailedRequest(vscode_languageserver_protocol_1$
|
|
16818
|
+
return client.sendRequest(vscode_languageserver_protocol_1$8.TypeDefinitionRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then(client.protocol2CodeConverter.asDefinitionResult, error => {
|
|
16819
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1$8.TypeDefinitionRequest.type, error, null);
|
|
16842
16820
|
});
|
|
16843
16821
|
};
|
|
16844
16822
|
|
|
@@ -16866,10 +16844,10 @@ Object.defineProperty(implementation, "__esModule", {
|
|
|
16866
16844
|
});
|
|
16867
16845
|
implementation.ImplementationFeature = void 0;
|
|
16868
16846
|
const vscode_1$5 = vscodeCompatibility;
|
|
16869
|
-
const vscode_languageserver_protocol_1$
|
|
16847
|
+
const vscode_languageserver_protocol_1$7 = main$3;
|
|
16870
16848
|
const client_1$5 = client;
|
|
16871
16849
|
|
|
16872
|
-
function ensure$
|
|
16850
|
+
function ensure$6(target, key) {
|
|
16873
16851
|
if (target[key] === void 0) {
|
|
16874
16852
|
target[key] = {};
|
|
16875
16853
|
}
|
|
@@ -16879,11 +16857,11 @@ function ensure$5(target, key) {
|
|
|
16879
16857
|
|
|
16880
16858
|
class ImplementationFeature extends client_1$5.TextDocumentFeature {
|
|
16881
16859
|
constructor(client) {
|
|
16882
|
-
super(client, vscode_languageserver_protocol_1$
|
|
16860
|
+
super(client, vscode_languageserver_protocol_1$7.ImplementationRequest.type);
|
|
16883
16861
|
}
|
|
16884
16862
|
|
|
16885
16863
|
fillClientCapabilities(capabilities) {
|
|
16886
|
-
let implementationSupport = ensure$
|
|
16864
|
+
let implementationSupport = ensure$6(ensure$6(capabilities, 'textDocument'), 'implementation');
|
|
16887
16865
|
implementationSupport.dynamicRegistration = true;
|
|
16888
16866
|
implementationSupport.linkSupport = true;
|
|
16889
16867
|
}
|
|
@@ -16907,8 +16885,8 @@ class ImplementationFeature extends client_1$5.TextDocumentFeature {
|
|
|
16907
16885
|
const client = this._client;
|
|
16908
16886
|
|
|
16909
16887
|
const provideImplementation = (document, position, token) => {
|
|
16910
|
-
return client.sendRequest(vscode_languageserver_protocol_1$
|
|
16911
|
-
return client.handleFailedRequest(vscode_languageserver_protocol_1$
|
|
16888
|
+
return client.sendRequest(vscode_languageserver_protocol_1$7.ImplementationRequest.type, client.code2ProtocolConverter.asTextDocumentPositionParams(document, position), token).then(client.protocol2CodeConverter.asDefinitionResult, error => {
|
|
16889
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1$7.ImplementationRequest.type, error, null);
|
|
16912
16890
|
});
|
|
16913
16891
|
};
|
|
16914
16892
|
|
|
@@ -16936,10 +16914,10 @@ Object.defineProperty(colorProvider, "__esModule", {
|
|
|
16936
16914
|
});
|
|
16937
16915
|
colorProvider.ColorProviderFeature = void 0;
|
|
16938
16916
|
const vscode_1$4 = vscodeCompatibility;
|
|
16939
|
-
const vscode_languageserver_protocol_1$
|
|
16917
|
+
const vscode_languageserver_protocol_1$6 = main$3;
|
|
16940
16918
|
const client_1$4 = client;
|
|
16941
16919
|
|
|
16942
|
-
function ensure$
|
|
16920
|
+
function ensure$5(target, key) {
|
|
16943
16921
|
if (target[key] === void 0) {
|
|
16944
16922
|
target[key] = {};
|
|
16945
16923
|
}
|
|
@@ -16949,11 +16927,11 @@ function ensure$4(target, key) {
|
|
|
16949
16927
|
|
|
16950
16928
|
class ColorProviderFeature extends client_1$4.TextDocumentFeature {
|
|
16951
16929
|
constructor(client) {
|
|
16952
|
-
super(client, vscode_languageserver_protocol_1$
|
|
16930
|
+
super(client, vscode_languageserver_protocol_1$6.DocumentColorRequest.type);
|
|
16953
16931
|
}
|
|
16954
16932
|
|
|
16955
16933
|
fillClientCapabilities(capabilities) {
|
|
16956
|
-
ensure$
|
|
16934
|
+
ensure$5(ensure$5(capabilities, 'textDocument'), 'colorProvider').dynamicRegistration = true;
|
|
16957
16935
|
}
|
|
16958
16936
|
|
|
16959
16937
|
initialize(capabilities, documentSelector) {
|
|
@@ -16980,8 +16958,8 @@ class ColorProviderFeature extends client_1$4.TextDocumentFeature {
|
|
|
16980
16958
|
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(context.document),
|
|
16981
16959
|
range: client.code2ProtocolConverter.asRange(context.range)
|
|
16982
16960
|
};
|
|
16983
|
-
return client.sendRequest(vscode_languageserver_protocol_1$
|
|
16984
|
-
return client.handleFailedRequest(vscode_languageserver_protocol_1$
|
|
16961
|
+
return client.sendRequest(vscode_languageserver_protocol_1$6.ColorPresentationRequest.type, requestParams, token).then(this.asColorPresentations.bind(this), error => {
|
|
16962
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1$6.ColorPresentationRequest.type, error, null);
|
|
16985
16963
|
});
|
|
16986
16964
|
};
|
|
16987
16965
|
|
|
@@ -16995,8 +16973,8 @@ class ColorProviderFeature extends client_1$4.TextDocumentFeature {
|
|
|
16995
16973
|
const requestParams = {
|
|
16996
16974
|
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document)
|
|
16997
16975
|
};
|
|
16998
|
-
return client.sendRequest(vscode_languageserver_protocol_1$
|
|
16999
|
-
return client.handleFailedRequest(vscode_languageserver_protocol_1$
|
|
16976
|
+
return client.sendRequest(vscode_languageserver_protocol_1$6.DocumentColorRequest.type, requestParams, token).then(this.asColorInformations.bind(this), error => {
|
|
16977
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1$6.ColorPresentationRequest.type, error, null);
|
|
17000
16978
|
});
|
|
17001
16979
|
};
|
|
17002
16980
|
|
|
@@ -17052,7 +17030,7 @@ Object.defineProperty(workspaceFolders, "__esModule", {
|
|
|
17052
17030
|
workspaceFolders.WorkspaceFoldersFeature = workspaceFolders.arrayDiff = void 0;
|
|
17053
17031
|
const UUID = uuid;
|
|
17054
17032
|
const vscode_1$3 = vscodeCompatibility;
|
|
17055
|
-
const vscode_languageserver_protocol_1$
|
|
17033
|
+
const vscode_languageserver_protocol_1$5 = main$3;
|
|
17056
17034
|
|
|
17057
17035
|
function access(target, key) {
|
|
17058
17036
|
if (target === void 0) {
|
|
@@ -17075,7 +17053,7 @@ class WorkspaceFoldersFeature {
|
|
|
17075
17053
|
}
|
|
17076
17054
|
|
|
17077
17055
|
get registrationType() {
|
|
17078
|
-
return vscode_languageserver_protocol_1$
|
|
17056
|
+
return vscode_languageserver_protocol_1$5.DidChangeWorkspaceFoldersNotification.type;
|
|
17079
17057
|
}
|
|
17080
17058
|
|
|
17081
17059
|
fillInitializeParams(params) {
|
|
@@ -17100,7 +17078,7 @@ class WorkspaceFoldersFeature {
|
|
|
17100
17078
|
|
|
17101
17079
|
initialize(capabilities) {
|
|
17102
17080
|
const client = this._client;
|
|
17103
|
-
client.onRequest(vscode_languageserver_protocol_1$
|
|
17081
|
+
client.onRequest(vscode_languageserver_protocol_1$5.WorkspaceFoldersRequest.type, token => {
|
|
17104
17082
|
const workspaceFolders = () => {
|
|
17105
17083
|
const folders = vscode_1$3.workspace.workspaceFolders;
|
|
17106
17084
|
|
|
@@ -17157,7 +17135,7 @@ class WorkspaceFoldersFeature {
|
|
|
17157
17135
|
}
|
|
17158
17136
|
};
|
|
17159
17137
|
|
|
17160
|
-
this._client.sendNotification(vscode_languageserver_protocol_1$
|
|
17138
|
+
this._client.sendNotification(vscode_languageserver_protocol_1$5.DidChangeWorkspaceFoldersNotification.type, params);
|
|
17161
17139
|
}
|
|
17162
17140
|
|
|
17163
17141
|
register(data) {
|
|
@@ -17225,10 +17203,10 @@ Object.defineProperty(foldingRange, "__esModule", {
|
|
|
17225
17203
|
});
|
|
17226
17204
|
foldingRange.FoldingRangeFeature = void 0;
|
|
17227
17205
|
const vscode_1$2 = vscodeCompatibility;
|
|
17228
|
-
const vscode_languageserver_protocol_1$
|
|
17206
|
+
const vscode_languageserver_protocol_1$4 = main$3;
|
|
17229
17207
|
const client_1$3 = client;
|
|
17230
17208
|
|
|
17231
|
-
function ensure$
|
|
17209
|
+
function ensure$4(target, key) {
|
|
17232
17210
|
if (target[key] === void 0) {
|
|
17233
17211
|
target[key] = {};
|
|
17234
17212
|
}
|
|
@@ -17238,11 +17216,11 @@ function ensure$3(target, key) {
|
|
|
17238
17216
|
|
|
17239
17217
|
class FoldingRangeFeature extends client_1$3.TextDocumentFeature {
|
|
17240
17218
|
constructor(client) {
|
|
17241
|
-
super(client, vscode_languageserver_protocol_1$
|
|
17219
|
+
super(client, vscode_languageserver_protocol_1$4.FoldingRangeRequest.type);
|
|
17242
17220
|
}
|
|
17243
17221
|
|
|
17244
17222
|
fillClientCapabilities(capabilities) {
|
|
17245
|
-
let capability = ensure$
|
|
17223
|
+
let capability = ensure$4(ensure$4(capabilities, 'textDocument'), 'foldingRange');
|
|
17246
17224
|
capability.dynamicRegistration = true;
|
|
17247
17225
|
capability.rangeLimit = 5000;
|
|
17248
17226
|
capability.lineFoldingOnly = true;
|
|
@@ -17270,8 +17248,8 @@ class FoldingRangeFeature extends client_1$3.TextDocumentFeature {
|
|
|
17270
17248
|
const requestParams = {
|
|
17271
17249
|
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document)
|
|
17272
17250
|
};
|
|
17273
|
-
return client.sendRequest(vscode_languageserver_protocol_1$
|
|
17274
|
-
return client.handleFailedRequest(vscode_languageserver_protocol_1$
|
|
17251
|
+
return client.sendRequest(vscode_languageserver_protocol_1$4.FoldingRangeRequest.type, requestParams, token).then(FoldingRangeFeature.asFoldingRanges, error => {
|
|
17252
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1$4.FoldingRangeRequest.type, error, null);
|
|
17275
17253
|
});
|
|
17276
17254
|
};
|
|
17277
17255
|
|
|
@@ -17285,13 +17263,13 @@ class FoldingRangeFeature extends client_1$3.TextDocumentFeature {
|
|
|
17285
17263
|
static asFoldingRangeKind(kind) {
|
|
17286
17264
|
if (kind) {
|
|
17287
17265
|
switch (kind) {
|
|
17288
|
-
case vscode_languageserver_protocol_1$
|
|
17266
|
+
case vscode_languageserver_protocol_1$4.FoldingRangeKind.Comment:
|
|
17289
17267
|
return vscode_1$2.FoldingRangeKind.Comment;
|
|
17290
17268
|
|
|
17291
|
-
case vscode_languageserver_protocol_1$
|
|
17269
|
+
case vscode_languageserver_protocol_1$4.FoldingRangeKind.Imports:
|
|
17292
17270
|
return vscode_1$2.FoldingRangeKind.Imports;
|
|
17293
17271
|
|
|
17294
|
-
case vscode_languageserver_protocol_1$
|
|
17272
|
+
case vscode_languageserver_protocol_1$4.FoldingRangeKind.Region:
|
|
17295
17273
|
return vscode_1$2.FoldingRangeKind.Region;
|
|
17296
17274
|
}
|
|
17297
17275
|
}
|
|
@@ -17326,10 +17304,10 @@ Object.defineProperty(callHierarchy, "__esModule", {
|
|
|
17326
17304
|
});
|
|
17327
17305
|
callHierarchy.CallHierarchyFeature = void 0;
|
|
17328
17306
|
const vscode_1$1 = vscodeCompatibility;
|
|
17329
|
-
const vscode_languageserver_protocol_1$
|
|
17307
|
+
const vscode_languageserver_protocol_1$3 = main$3;
|
|
17330
17308
|
const client_1$2 = client;
|
|
17331
17309
|
|
|
17332
|
-
function ensure$
|
|
17310
|
+
function ensure$3(target, key) {
|
|
17333
17311
|
if (target[key] === void 0) {
|
|
17334
17312
|
target[key] = {};
|
|
17335
17313
|
}
|
|
@@ -17349,10 +17327,10 @@ class CallHierarchyProvider {
|
|
|
17349
17327
|
|
|
17350
17328
|
const prepareCallHierarchy = (document, position, token) => {
|
|
17351
17329
|
const params = client.code2ProtocolConverter.asTextDocumentPositionParams(document, position);
|
|
17352
|
-
return client.sendRequest(vscode_languageserver_protocol_1$
|
|
17330
|
+
return client.sendRequest(vscode_languageserver_protocol_1$3.CallHierarchyPrepareRequest.type, params, token).then(result => {
|
|
17353
17331
|
return client.protocol2CodeConverter.asCallHierarchyItems(result);
|
|
17354
17332
|
}, error => {
|
|
17355
|
-
return client.handleFailedRequest(vscode_languageserver_protocol_1$
|
|
17333
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1$3.CallHierarchyPrepareRequest.type, error, null);
|
|
17356
17334
|
});
|
|
17357
17335
|
};
|
|
17358
17336
|
|
|
@@ -17367,10 +17345,10 @@ class CallHierarchyProvider {
|
|
|
17367
17345
|
const params = {
|
|
17368
17346
|
item: client.code2ProtocolConverter.asCallHierarchyItem(item)
|
|
17369
17347
|
};
|
|
17370
|
-
return client.sendRequest(vscode_languageserver_protocol_1$
|
|
17348
|
+
return client.sendRequest(vscode_languageserver_protocol_1$3.CallHierarchyIncomingCallsRequest.type, params, token).then(result => {
|
|
17371
17349
|
return client.protocol2CodeConverter.asCallHierarchyIncomingCalls(result);
|
|
17372
17350
|
}, error => {
|
|
17373
|
-
return client.handleFailedRequest(vscode_languageserver_protocol_1$
|
|
17351
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1$3.CallHierarchyIncomingCallsRequest.type, error, null);
|
|
17374
17352
|
});
|
|
17375
17353
|
};
|
|
17376
17354
|
|
|
@@ -17385,10 +17363,10 @@ class CallHierarchyProvider {
|
|
|
17385
17363
|
const params = {
|
|
17386
17364
|
item: client.code2ProtocolConverter.asCallHierarchyItem(item)
|
|
17387
17365
|
};
|
|
17388
|
-
return client.sendRequest(vscode_languageserver_protocol_1$
|
|
17366
|
+
return client.sendRequest(vscode_languageserver_protocol_1$3.CallHierarchyOutgoingCallsRequest.type, params, token).then(result => {
|
|
17389
17367
|
return client.protocol2CodeConverter.asCallHierarchyOutgoingCalls(result);
|
|
17390
17368
|
}, error => {
|
|
17391
|
-
return client.handleFailedRequest(vscode_languageserver_protocol_1$
|
|
17369
|
+
return client.handleFailedRequest(vscode_languageserver_protocol_1$3.CallHierarchyOutgoingCallsRequest.type, error, null);
|
|
17392
17370
|
});
|
|
17393
17371
|
};
|
|
17394
17372
|
|
|
@@ -17399,12 +17377,12 @@ class CallHierarchyProvider {
|
|
|
17399
17377
|
|
|
17400
17378
|
class CallHierarchyFeature extends client_1$2.TextDocumentFeature {
|
|
17401
17379
|
constructor(client) {
|
|
17402
|
-
super(client, vscode_languageserver_protocol_1$
|
|
17380
|
+
super(client, vscode_languageserver_protocol_1$3.CallHierarchyPrepareRequest.type);
|
|
17403
17381
|
}
|
|
17404
17382
|
|
|
17405
17383
|
fillClientCapabilities(cap) {
|
|
17406
17384
|
const capabilities = cap;
|
|
17407
|
-
const capability = ensure$
|
|
17385
|
+
const capability = ensure$3(ensure$3(capabilities, 'textDocument'), 'callHierarchy');
|
|
17408
17386
|
capability.dynamicRegistration = true;
|
|
17409
17387
|
}
|
|
17410
17388
|
|
|
@@ -17431,6 +17409,65 @@ class CallHierarchyFeature extends client_1$2.TextDocumentFeature {
|
|
|
17431
17409
|
|
|
17432
17410
|
callHierarchy.CallHierarchyFeature = CallHierarchyFeature;
|
|
17433
17411
|
|
|
17412
|
+
var progress = {};
|
|
17413
|
+
|
|
17414
|
+
/* --------------------------------------------------------------------------------------------
|
|
17415
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
17416
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
17417
|
+
* ------------------------------------------------------------------------------------------ */
|
|
17418
|
+
|
|
17419
|
+
|
|
17420
|
+
Object.defineProperty(progress, "__esModule", {
|
|
17421
|
+
value: true
|
|
17422
|
+
});
|
|
17423
|
+
progress.ProgressFeature = void 0;
|
|
17424
|
+
const vscode_languageserver_protocol_1$2 = main$3;
|
|
17425
|
+
const progressPart_1 = progressPart;
|
|
17426
|
+
|
|
17427
|
+
function ensure$2(target, key) {
|
|
17428
|
+
if (target[key] === void 0) {
|
|
17429
|
+
target[key] = Object.create(null);
|
|
17430
|
+
}
|
|
17431
|
+
|
|
17432
|
+
return target[key];
|
|
17433
|
+
}
|
|
17434
|
+
|
|
17435
|
+
class ProgressFeature {
|
|
17436
|
+
constructor(_client) {
|
|
17437
|
+
this._client = _client;
|
|
17438
|
+
this.activeParts = new Set();
|
|
17439
|
+
}
|
|
17440
|
+
|
|
17441
|
+
fillClientCapabilities(capabilities) {
|
|
17442
|
+
ensure$2(capabilities, 'window').workDoneProgress = true;
|
|
17443
|
+
}
|
|
17444
|
+
|
|
17445
|
+
initialize() {
|
|
17446
|
+
const client = this._client;
|
|
17447
|
+
|
|
17448
|
+
const deleteHandler = part => {
|
|
17449
|
+
this.activeParts.delete(part);
|
|
17450
|
+
};
|
|
17451
|
+
|
|
17452
|
+
const createHandler = params => {
|
|
17453
|
+
this.activeParts.add(new progressPart_1.ProgressPart(this._client, params.token, deleteHandler));
|
|
17454
|
+
};
|
|
17455
|
+
|
|
17456
|
+
client.onRequest(vscode_languageserver_protocol_1$2.WorkDoneProgressCreateRequest.type, createHandler);
|
|
17457
|
+
}
|
|
17458
|
+
|
|
17459
|
+
dispose() {
|
|
17460
|
+
for (const part of this.activeParts) {
|
|
17461
|
+
part.done();
|
|
17462
|
+
}
|
|
17463
|
+
|
|
17464
|
+
this.activeParts.clear();
|
|
17465
|
+
}
|
|
17466
|
+
|
|
17467
|
+
}
|
|
17468
|
+
|
|
17469
|
+
progress.ProgressFeature = ProgressFeature;
|
|
17470
|
+
|
|
17434
17471
|
var semanticTokens = {};
|
|
17435
17472
|
|
|
17436
17473
|
/* --------------------------------------------------------------------------------------------
|
|
@@ -17682,6 +17719,7 @@ const colorProvider_1 = colorProvider;
|
|
|
17682
17719
|
const workspaceFolders_1 = workspaceFolders;
|
|
17683
17720
|
const foldingRange_1 = foldingRange;
|
|
17684
17721
|
const callHierarchy_1 = callHierarchy;
|
|
17722
|
+
const progress_1 = progress;
|
|
17685
17723
|
const semanticTokens_1 = semanticTokens;
|
|
17686
17724
|
const declaration_1 = declaration;
|
|
17687
17725
|
__exportStar(client, exports);
|
|
@@ -17749,6 +17787,7 @@ class MonacoLanguageClient extends client_1.BaseLanguageClient {
|
|
|
17749
17787
|
this.registerFeature(new declaration_1.DeclarationFeature(this));
|
|
17750
17788
|
this.registerFeature(new semanticTokens_1.SemanticTokensFeature(this));
|
|
17751
17789
|
this.registerFeature(new callHierarchy_1.CallHierarchyFeature(this));
|
|
17790
|
+
this.registerFeature(new progress_1.ProgressFeature(this));
|
|
17752
17791
|
const features = this['_features'];
|
|
17753
17792
|
for (const feature of features) {
|
|
17754
17793
|
if (feature instanceof colorProvider_1.ColorProviderFeature) {
|
|
@@ -18537,6 +18576,7 @@ class MonacoLanguages {
|
|
|
18537
18576
|
getLegend() {
|
|
18538
18577
|
return legend;
|
|
18539
18578
|
},
|
|
18579
|
+
onDidChange: provider.onDidChange,
|
|
18540
18580
|
provideDocumentSemanticTokens: (model, lastResultId, token) => __awaiter(this, void 0, void 0, function* () {
|
|
18541
18581
|
if (!this.matchModel(selector, MonacoModelIdentifier.fromModel(model))) {
|
|
18542
18582
|
return undefined;
|
|
@@ -18605,6 +18645,9 @@ class MonacoLanguages {
|
|
|
18605
18645
|
else {
|
|
18606
18646
|
languages.add(this.matchLanguageByFilter(selector));
|
|
18607
18647
|
}
|
|
18648
|
+
if (languages.has('*')) {
|
|
18649
|
+
return new Set(['*']);
|
|
18650
|
+
}
|
|
18608
18651
|
return languages;
|
|
18609
18652
|
}
|
|
18610
18653
|
matchLanguageByFilter(selector) {
|
|
@@ -18626,7 +18669,7 @@ var monacoWorkspace = {};
|
|
|
18626
18669
|
Object.defineProperty(monacoWorkspace, "__esModule", { value: true });
|
|
18627
18670
|
monacoWorkspace.MonacoWorkspace = void 0;
|
|
18628
18671
|
const services_1 = services$1;
|
|
18629
|
-
const vscode_languageserver_textdocument_1 = require$$1
|
|
18672
|
+
const vscode_languageserver_textdocument_1 = require$$1;
|
|
18630
18673
|
class MonacoWorkspace {
|
|
18631
18674
|
constructor(_monaco, p2m, m2p, _rootUri = null) {
|
|
18632
18675
|
this._monaco = _monaco;
|
|
@@ -20031,6 +20074,20 @@ class WatchableConsoleWindow {
|
|
|
20031
20074
|
_defineProperty(this, "onDidChangeChannelsEmitter", new lib$1.Emitter());
|
|
20032
20075
|
|
|
20033
20076
|
_defineProperty(this, "channels", new Map());
|
|
20077
|
+
|
|
20078
|
+
_defineProperty(this, "withProgress", async (options, task) => {
|
|
20079
|
+
console.info('[LSP]', 'Starting task with progress:', options.location, options.title);
|
|
20080
|
+
|
|
20081
|
+
try {
|
|
20082
|
+
return await task({
|
|
20083
|
+
report: params => {
|
|
20084
|
+
console.info('[LSP]', "Task progress: ".concat(params.increment, "%:"), params.message);
|
|
20085
|
+
}
|
|
20086
|
+
}, new lib$1.CancellationTokenSource().token);
|
|
20087
|
+
} finally {
|
|
20088
|
+
console.info('[LSP]', 'Task completed:', options.title);
|
|
20089
|
+
}
|
|
20090
|
+
});
|
|
20034
20091
|
}
|
|
20035
20092
|
|
|
20036
20093
|
async showMessage(type, message) {
|
|
@@ -20134,32 +20191,31 @@ class MemoryWorkspaceConfiguration {
|
|
|
20134
20191
|
|
|
20135
20192
|
}
|
|
20136
20193
|
|
|
20194
|
+
const simpleConfigurationService = monaco.editor.StaticServices.configurationService.get();
|
|
20195
|
+
|
|
20137
20196
|
class Configuration {
|
|
20138
20197
|
constructor() {
|
|
20139
20198
|
_defineProperty(this, "onDidChangeConfigurationEmitter", new lib$1.Emitter());
|
|
20140
|
-
|
|
20141
|
-
_defineProperty(this, "configurations", {});
|
|
20142
20199
|
}
|
|
20143
20200
|
|
|
20144
|
-
getConfiguration(section) {
|
|
20145
|
-
return new MemoryWorkspaceConfiguration(
|
|
20201
|
+
getConfiguration(section, resource) {
|
|
20202
|
+
return new MemoryWorkspaceConfiguration(this.getValue(section, resource));
|
|
20146
20203
|
}
|
|
20147
20204
|
|
|
20148
|
-
|
|
20149
|
-
|
|
20150
|
-
|
|
20151
|
-
});
|
|
20152
|
-
const event = {
|
|
20153
|
-
affectsConfiguration(eventSection) {
|
|
20154
|
-
return section === eventSection;
|
|
20155
|
-
}
|
|
20156
|
-
|
|
20205
|
+
getValue(section, resource) {
|
|
20206
|
+
const override = {
|
|
20207
|
+
resource: resource != null ? monaco.Uri.parse(resource) : null
|
|
20157
20208
|
};
|
|
20158
|
-
|
|
20209
|
+
|
|
20210
|
+
if (section == null) {
|
|
20211
|
+
return simpleConfigurationService.getValue(override);
|
|
20212
|
+
}
|
|
20213
|
+
|
|
20214
|
+
return simpleConfigurationService.getValue(section, override);
|
|
20159
20215
|
}
|
|
20160
20216
|
|
|
20161
20217
|
get onDidChangeConfiguration() {
|
|
20162
|
-
return
|
|
20218
|
+
return simpleConfigurationService.onDidChangeConfiguration;
|
|
20163
20219
|
}
|
|
20164
20220
|
|
|
20165
20221
|
}
|
|
@@ -20284,10 +20340,6 @@ function installServices() {
|
|
|
20284
20340
|
}
|
|
20285
20341
|
}
|
|
20286
20342
|
|
|
20287
|
-
function updateConfiguration(section, value) {
|
|
20288
|
-
services.workspace.configurations.update(section, value);
|
|
20289
|
-
}
|
|
20290
|
-
|
|
20291
20343
|
var lib = {};
|
|
20292
20344
|
|
|
20293
20345
|
var disposable = {};
|
|
@@ -20708,18 +20760,32 @@ async function openConnection(url, errorHandler, closeHandler) {
|
|
|
20708
20760
|
args[_key] = arguments[_key];
|
|
20709
20761
|
}
|
|
20710
20762
|
|
|
20711
|
-
connection.onRequest(args[0], function () {
|
|
20763
|
+
return connection.onRequest(args[0], function () {
|
|
20712
20764
|
// Hack for https://github.com/OmniSharp/omnisharp-roslyn/issues/2119
|
|
20713
20765
|
if (args[0].method === lib$1.RegistrationRequest.type.method) {
|
|
20714
20766
|
const registrationParams = arguments.length <= 0 ? undefined : arguments[0];
|
|
20715
20767
|
registrationParams.registrations = registrationParams.registrations.filter(registration => {
|
|
20716
|
-
|
|
20768
|
+
const alreadyExisting = existingRegistrations.has(registration.id);
|
|
20769
|
+
|
|
20770
|
+
if (alreadyExisting) {
|
|
20771
|
+
console.warn('Registration already existing', registration.id, registration.method);
|
|
20772
|
+
}
|
|
20773
|
+
|
|
20774
|
+
return !alreadyExisting;
|
|
20717
20775
|
});
|
|
20718
20776
|
registrationParams.registrations.forEach(registration => {
|
|
20719
20777
|
existingRegistrations.add(registration.id);
|
|
20720
20778
|
});
|
|
20721
20779
|
}
|
|
20722
20780
|
|
|
20781
|
+
if (args[0].method === lib$1.UnregistrationRequest.type.method) {
|
|
20782
|
+
const unregistrationParams = arguments.length <= 0 ? undefined : arguments[0];
|
|
20783
|
+
|
|
20784
|
+
for (const unregistration of unregistrationParams.unregisterations) {
|
|
20785
|
+
existingRegistrations.delete(unregistration.id);
|
|
20786
|
+
}
|
|
20787
|
+
}
|
|
20788
|
+
|
|
20723
20789
|
return args[1](...arguments);
|
|
20724
20790
|
});
|
|
20725
20791
|
},
|
|
@@ -20741,7 +20807,7 @@ async function openConnection(url, errorHandler, closeHandler) {
|
|
|
20741
20807
|
// The shutdown should NEVER fail or the connection is not closed and the lsp client is not properly cleaned
|
|
20742
20808
|
// see https://github.com/microsoft/vscode-languageserver-node/blob/master/client/src/client.ts#L3103
|
|
20743
20809
|
try {
|
|
20744
|
-
connection.exit();
|
|
20810
|
+
await connection.exit();
|
|
20745
20811
|
} catch (error) {
|
|
20746
20812
|
console.warn('[LSP]', 'Error while shutdown lsp', error);
|
|
20747
20813
|
}
|
|
@@ -20760,24 +20826,18 @@ async function openConnection(url, errorHandler, closeHandler) {
|
|
|
20760
20826
|
const RETRY_DELAY = 3000;
|
|
20761
20827
|
|
|
20762
20828
|
class CGLSPConnectionProvider {
|
|
20763
|
-
constructor(
|
|
20764
|
-
|
|
20765
|
-
|
|
20766
|
-
|
|
20767
|
-
|
|
20768
|
-
_defineProperty(this, "libraryUrls", void 0);
|
|
20769
|
-
|
|
20770
|
-
_defineProperty(this, "getSecurityToken", void 0);
|
|
20771
|
-
|
|
20772
|
-
this.serverUrl = serverUrl;
|
|
20773
|
-
this.language = language;
|
|
20829
|
+
constructor(serverAddress, id, sessionId, libraryUrls, getSecurityToken) {
|
|
20830
|
+
this.serverAddress = serverAddress;
|
|
20831
|
+
this.id = id;
|
|
20832
|
+
this.sessionId = sessionId;
|
|
20774
20833
|
this.libraryUrls = libraryUrls;
|
|
20775
20834
|
this.getSecurityToken = getSecurityToken;
|
|
20776
20835
|
}
|
|
20777
20836
|
|
|
20778
20837
|
async get(errorHandler, closeHandler) {
|
|
20779
20838
|
try {
|
|
20780
|
-
const
|
|
20839
|
+
const path = this.sessionId != null ? "run/".concat(this.sessionId, "/").concat(this.id) : "run/".concat(this.id);
|
|
20840
|
+
const url = new URL(path, this.serverAddress);
|
|
20781
20841
|
this.libraryUrls.forEach(libraryUrl => url.searchParams.append('libraryUrl', libraryUrl));
|
|
20782
20842
|
url.searchParams.append('token', await this.getSecurityToken());
|
|
20783
20843
|
return await openConnection(url, errorHandler, closeHandler);
|
|
@@ -20790,39 +20850,275 @@ class CGLSPConnectionProvider {
|
|
|
20790
20850
|
|
|
20791
20851
|
}
|
|
20792
20852
|
|
|
20793
|
-
function createLanguageClient(_ref,
|
|
20853
|
+
function createLanguageClient(id, sessionId, _ref, languageServerAddress, getSecurityToken, libraryUrls, errorHandler, middleware) {
|
|
20794
20854
|
let {
|
|
20795
20855
|
documentSelector,
|
|
20796
|
-
|
|
20797
|
-
configurationSection,
|
|
20856
|
+
synchronize,
|
|
20798
20857
|
initializationOptions
|
|
20799
20858
|
} = _ref;
|
|
20800
20859
|
const client = new lib$1.MonacoLanguageClient({
|
|
20801
|
-
id: "".concat(
|
|
20802
|
-
name: "CodinGame ".concat(
|
|
20860
|
+
id: "".concat(id, "-languageclient"),
|
|
20861
|
+
name: "CodinGame ".concat(id, " Language Client"),
|
|
20803
20862
|
clientOptions: {
|
|
20804
20863
|
// use a language id as a document selector
|
|
20805
20864
|
documentSelector,
|
|
20806
20865
|
// disable the default error handler
|
|
20807
20866
|
errorHandler,
|
|
20808
20867
|
middleware,
|
|
20809
|
-
synchronize
|
|
20810
|
-
configurationSection
|
|
20811
|
-
},
|
|
20868
|
+
synchronize,
|
|
20812
20869
|
initializationOptions
|
|
20813
20870
|
},
|
|
20814
|
-
connectionProvider: new CGLSPConnectionProvider(
|
|
20871
|
+
connectionProvider: new CGLSPConnectionProvider(languageServerAddress, id, sessionId, libraryUrls, getSecurityToken)
|
|
20815
20872
|
});
|
|
20816
20873
|
client.registerProposedFeatures();
|
|
20817
|
-
registerExtensionFeatures(client,
|
|
20874
|
+
registerExtensionFeatures(client, id);
|
|
20818
20875
|
return client;
|
|
20819
20876
|
}
|
|
20820
20877
|
|
|
20878
|
+
const staticOptions = {
|
|
20879
|
+
angular: {
|
|
20880
|
+
documentSelector: [{
|
|
20881
|
+
scheme: 'file',
|
|
20882
|
+
pattern: '**/*.ts'
|
|
20883
|
+
}]
|
|
20884
|
+
},
|
|
20885
|
+
bash: {
|
|
20886
|
+
documentSelector: [{
|
|
20887
|
+
scheme: 'file',
|
|
20888
|
+
pattern: '**/*.bash'
|
|
20889
|
+
}]
|
|
20890
|
+
},
|
|
20891
|
+
c: {
|
|
20892
|
+
documentSelector: [{
|
|
20893
|
+
scheme: 'file',
|
|
20894
|
+
language: 'c'
|
|
20895
|
+
}, {
|
|
20896
|
+
scheme: 'file',
|
|
20897
|
+
language: 'cpp'
|
|
20898
|
+
}]
|
|
20899
|
+
},
|
|
20900
|
+
csharp: {
|
|
20901
|
+
documentSelector: [{
|
|
20902
|
+
language: 'csharp'
|
|
20903
|
+
}]
|
|
20904
|
+
},
|
|
20905
|
+
cpp: {
|
|
20906
|
+
documentSelector: [{
|
|
20907
|
+
scheme: 'file',
|
|
20908
|
+
language: 'c'
|
|
20909
|
+
}, {
|
|
20910
|
+
scheme: 'file',
|
|
20911
|
+
language: 'cpp'
|
|
20912
|
+
}, {
|
|
20913
|
+
scheme: 'file',
|
|
20914
|
+
language: 'cuda-cpp'
|
|
20915
|
+
}]
|
|
20916
|
+
},
|
|
20917
|
+
clojure: {
|
|
20918
|
+
documentSelector: [{
|
|
20919
|
+
scheme: 'file',
|
|
20920
|
+
pattern: '**/*.clj',
|
|
20921
|
+
language: 'clojure'
|
|
20922
|
+
}]
|
|
20923
|
+
},
|
|
20924
|
+
cobol: {
|
|
20925
|
+
documentSelector: ['COBOL'],
|
|
20926
|
+
synchronize: {
|
|
20927
|
+
configurationSection: 'cobol-lsp'
|
|
20928
|
+
}
|
|
20929
|
+
},
|
|
20930
|
+
dart: {
|
|
20931
|
+
documentSelector: [{
|
|
20932
|
+
scheme: 'file',
|
|
20933
|
+
pattern: '**/*.dart',
|
|
20934
|
+
language: 'dart'
|
|
20935
|
+
}]
|
|
20936
|
+
},
|
|
20937
|
+
go: {
|
|
20938
|
+
documentSelector: [{
|
|
20939
|
+
language: 'go',
|
|
20940
|
+
scheme: 'file'
|
|
20941
|
+
}, {
|
|
20942
|
+
language: 'go.mod',
|
|
20943
|
+
scheme: 'file'
|
|
20944
|
+
}, {
|
|
20945
|
+
language: 'go.sum',
|
|
20946
|
+
scheme: 'file'
|
|
20947
|
+
}, {
|
|
20948
|
+
language: 'go.work',
|
|
20949
|
+
scheme: 'file'
|
|
20950
|
+
}, {
|
|
20951
|
+
language: 'tmpl',
|
|
20952
|
+
scheme: 'file'
|
|
20953
|
+
}]
|
|
20954
|
+
},
|
|
20955
|
+
groovy: {
|
|
20956
|
+
documentSelector: [{
|
|
20957
|
+
scheme: 'file',
|
|
20958
|
+
language: 'groovy'
|
|
20959
|
+
}],
|
|
20960
|
+
synchronize: {
|
|
20961
|
+
configurationSection: 'groovy'
|
|
20962
|
+
}
|
|
20963
|
+
},
|
|
20964
|
+
java: {
|
|
20965
|
+
documentSelector: [{
|
|
20966
|
+
scheme: 'file',
|
|
20967
|
+
language: 'java'
|
|
20968
|
+
}, {
|
|
20969
|
+
scheme: 'jdt',
|
|
20970
|
+
language: 'java'
|
|
20971
|
+
}, {
|
|
20972
|
+
scheme: 'untitled',
|
|
20973
|
+
language: 'java'
|
|
20974
|
+
}],
|
|
20975
|
+
synchronize: {
|
|
20976
|
+
configurationSection: ['java', 'editor.insertSpaces', 'editor.tabSize']
|
|
20977
|
+
}
|
|
20978
|
+
},
|
|
20979
|
+
javascript: {
|
|
20980
|
+
documentSelector: [{
|
|
20981
|
+
pattern: '**/*.{js}',
|
|
20982
|
+
language: 'javascript'
|
|
20983
|
+
}, {
|
|
20984
|
+
pattern: '**/**.{js,jsx}',
|
|
20985
|
+
language: 'javascript'
|
|
20986
|
+
}]
|
|
20987
|
+
},
|
|
20988
|
+
kotlin: {
|
|
20989
|
+
// https://github.com/fwcd/vscode-kotlin/blob/db5916080868a6a8e064c60d49624926c2fa61bd/src/languageSetup.ts#L104
|
|
20990
|
+
documentSelector: [{
|
|
20991
|
+
language: 'kotlin',
|
|
20992
|
+
scheme: 'file'
|
|
20993
|
+
}, {
|
|
20994
|
+
language: 'kotlin',
|
|
20995
|
+
scheme: 'kls'
|
|
20996
|
+
}],
|
|
20997
|
+
synchronize: {
|
|
20998
|
+
configurationSection: 'kotlin'
|
|
20999
|
+
}
|
|
21000
|
+
},
|
|
21001
|
+
lua: {
|
|
21002
|
+
documentSelector: [{
|
|
21003
|
+
scheme: 'file',
|
|
21004
|
+
language: 'lua'
|
|
21005
|
+
}],
|
|
21006
|
+
synchronize: {
|
|
21007
|
+
configurationSection: 'Lua'
|
|
21008
|
+
}
|
|
21009
|
+
},
|
|
21010
|
+
'php-serenata': {
|
|
21011
|
+
// https://gitlab.com/Serenata/visual-studio-code-client/-/blob/master/src/extension.ts#L120
|
|
21012
|
+
documentSelector: [{
|
|
21013
|
+
pattern: '**/*.php',
|
|
21014
|
+
scheme: 'file'
|
|
21015
|
+
}],
|
|
21016
|
+
synchronize: {
|
|
21017
|
+
configurationSection: 'serenata'
|
|
21018
|
+
},
|
|
21019
|
+
initializationOptions: {
|
|
21020
|
+
configuration: {
|
|
21021
|
+
uris: ['file:///tmp/project'],
|
|
21022
|
+
phpVersion: 7.3,
|
|
21023
|
+
fileExtensions: ['php'],
|
|
21024
|
+
indexDatabaseUri: 'file:///tmp/index.sqlite',
|
|
21025
|
+
excludedPathExpressions: ['file:///opt/serenata']
|
|
21026
|
+
}
|
|
21027
|
+
}
|
|
21028
|
+
},
|
|
21029
|
+
php: {
|
|
21030
|
+
documentSelector: [{
|
|
21031
|
+
pattern: '**/*.php',
|
|
21032
|
+
language: 'php'
|
|
21033
|
+
}]
|
|
21034
|
+
},
|
|
21035
|
+
python: {
|
|
21036
|
+
documentSelector: [{
|
|
21037
|
+
language: 'python'
|
|
21038
|
+
}],
|
|
21039
|
+
synchronize: {
|
|
21040
|
+
configurationSection: 'python'
|
|
21041
|
+
}
|
|
21042
|
+
},
|
|
21043
|
+
r: {
|
|
21044
|
+
// https://github.com/REditorSupport/vscode-R/blob/96ed4740101d8cd82f908b415df1dd205b4be824/src/languageService.ts#L186
|
|
21045
|
+
documentSelector: [{
|
|
21046
|
+
scheme: 'file',
|
|
21047
|
+
language: 'r'
|
|
21048
|
+
}, {
|
|
21049
|
+
scheme: 'file',
|
|
21050
|
+
language: 'rmd'
|
|
21051
|
+
}],
|
|
21052
|
+
synchronize: {
|
|
21053
|
+
configurationSection: 'r.lsp'
|
|
21054
|
+
}
|
|
21055
|
+
},
|
|
21056
|
+
react: {
|
|
21057
|
+
documentSelector: [{
|
|
21058
|
+
pattern: '**/*.{js,jsx}',
|
|
21059
|
+
language: 'javascript'
|
|
21060
|
+
}],
|
|
21061
|
+
synchronize: {}
|
|
21062
|
+
},
|
|
21063
|
+
ruby: {
|
|
21064
|
+
// https://github.com/rubyide/vscode-ruby/blob/8ba0e01956865a3dbd932279a3d42f7183bcf73a/packages/vscode-ruby-client/src/client.ts#L30
|
|
21065
|
+
documentSelector: [{
|
|
21066
|
+
scheme: 'file',
|
|
21067
|
+
language: 'ruby'
|
|
21068
|
+
}, {
|
|
21069
|
+
scheme: 'untitled',
|
|
21070
|
+
language: 'ruby'
|
|
21071
|
+
}]
|
|
21072
|
+
},
|
|
21073
|
+
rust: {
|
|
21074
|
+
// https://github.com/rust-lang/vscode-rust/blob/b1ae67b06640ffab6e1ebb72e07364b4477dfbf1/rust-analyzer/editors/code/src/client.ts#L42
|
|
21075
|
+
documentSelector: [{
|
|
21076
|
+
scheme: 'file',
|
|
21077
|
+
language: 'rust'
|
|
21078
|
+
}]
|
|
21079
|
+
},
|
|
21080
|
+
scala: {
|
|
21081
|
+
documentSelector: [{
|
|
21082
|
+
scheme: 'file',
|
|
21083
|
+
language: 'scala'
|
|
21084
|
+
}],
|
|
21085
|
+
synchronize: {
|
|
21086
|
+
configurationSection: 'metals'
|
|
21087
|
+
}
|
|
21088
|
+
},
|
|
21089
|
+
sql: {
|
|
21090
|
+
documentSelector: [{
|
|
21091
|
+
language: 'sql'
|
|
21092
|
+
}]
|
|
21093
|
+
},
|
|
21094
|
+
swift: {
|
|
21095
|
+
// https://github.com/apple/sourcekit-lsp/blob/59b5e68f7f8408b5bc44bd47f71ef1afdc63e7a6/Editors/vscode/src/extension.ts#L22
|
|
21096
|
+
documentSelector: ['swift', 'cpp', 'c', 'objective-c', 'objective-cpp'],
|
|
21097
|
+
synchronize: {}
|
|
21098
|
+
},
|
|
21099
|
+
typescript: {
|
|
21100
|
+
documentSelector: [{
|
|
21101
|
+
pattern: '**/*.{ts}',
|
|
21102
|
+
language: 'typescript'
|
|
21103
|
+
}],
|
|
21104
|
+
synchronize: {}
|
|
21105
|
+
},
|
|
21106
|
+
vue: {
|
|
21107
|
+
documentSelector: [{
|
|
21108
|
+
pattern: '**/*.js',
|
|
21109
|
+
language: 'javascript'
|
|
21110
|
+
}],
|
|
21111
|
+
synchronize: {}
|
|
21112
|
+
}
|
|
21113
|
+
};
|
|
21114
|
+
|
|
20821
21115
|
class LanguageClientManager {
|
|
20822
|
-
constructor(
|
|
20823
|
-
this.
|
|
21116
|
+
constructor(id, sessionId, languageServerAddress, getSecurityToken, languageServerOptions, libraryUrls) {
|
|
21117
|
+
this.id = id;
|
|
21118
|
+
this.sessionId = sessionId;
|
|
21119
|
+
this.languageServerAddress = languageServerAddress;
|
|
20824
21120
|
this.getSecurityToken = getSecurityToken;
|
|
20825
|
-
this.
|
|
21121
|
+
this.languageServerOptions = languageServerOptions;
|
|
20826
21122
|
this.libraryUrls = libraryUrls;
|
|
20827
21123
|
|
|
20828
21124
|
_defineProperty(this, "languageClient", void 0);
|
|
@@ -20835,8 +21131,6 @@ class LanguageClientManager {
|
|
|
20835
21131
|
|
|
20836
21132
|
_defineProperty(this, "currentStatus", void 0);
|
|
20837
21133
|
|
|
20838
|
-
_defineProperty(this, "configuration", void 0);
|
|
20839
|
-
|
|
20840
21134
|
_defineProperty(this, "handleClose", () => {
|
|
20841
21135
|
if (this.isDisposed()) {
|
|
20842
21136
|
return lib$1.CloseAction.DoNotRestart;
|
|
@@ -20853,8 +21147,6 @@ class LanguageClientManager {
|
|
|
20853
21147
|
});
|
|
20854
21148
|
return lib$1.ErrorAction.Continue;
|
|
20855
21149
|
});
|
|
20856
|
-
|
|
20857
|
-
this.configuration = languageServerConfig.configuration;
|
|
20858
21150
|
}
|
|
20859
21151
|
|
|
20860
21152
|
updateStatus(status) {
|
|
@@ -20899,41 +21191,64 @@ class LanguageClientManager {
|
|
|
20899
21191
|
}
|
|
20900
21192
|
|
|
20901
21193
|
isModelManaged(document) {
|
|
20902
|
-
|
|
21194
|
+
if (this.languageServerOptions.documentSelector == null) {
|
|
21195
|
+
return false;
|
|
21196
|
+
}
|
|
21197
|
+
|
|
21198
|
+
return lib$1.Services.get().languages.match(this.languageServerOptions.documentSelector, document);
|
|
20903
21199
|
}
|
|
20904
21200
|
|
|
20905
21201
|
isDisposed() {
|
|
20906
21202
|
return this.languageClient == null;
|
|
20907
21203
|
}
|
|
20908
21204
|
|
|
20909
|
-
updateConfiguration(configuration) {
|
|
20910
|
-
const {
|
|
20911
|
-
configurationSection
|
|
20912
|
-
} = this.languageServerConfig;
|
|
20913
|
-
this.configuration = configuration;
|
|
20914
|
-
|
|
20915
|
-
if (configurationSection != null && this.languageClient != null) {
|
|
20916
|
-
updateConfiguration(configurationSection, configuration);
|
|
20917
|
-
}
|
|
20918
|
-
}
|
|
20919
|
-
|
|
20920
21205
|
start() {
|
|
20921
|
-
const
|
|
20922
|
-
const languageClient = createLanguageClient(this.
|
|
21206
|
+
const onServerResponse = new lib$1.Emitter();
|
|
21207
|
+
const languageClient = createLanguageClient(this.id, this.sessionId, this.languageServerOptions, this.languageServerAddress, this.getSecurityToken, this.libraryUrls, {
|
|
20923
21208
|
error: this.handleError,
|
|
20924
21209
|
closed: this.handleClose
|
|
20925
21210
|
}, {
|
|
20926
21211
|
handleDiagnostics: (uri, diagnostics, next) => {
|
|
20927
21212
|
next(uri, diagnostics);
|
|
20928
|
-
|
|
21213
|
+
onServerResponse.fire();
|
|
21214
|
+
},
|
|
21215
|
+
provideCodeActions: async (document, range, context, token, next) => {
|
|
21216
|
+
try {
|
|
21217
|
+
return await next(document, range, context, token);
|
|
21218
|
+
} finally {
|
|
21219
|
+
onServerResponse.fire();
|
|
21220
|
+
}
|
|
21221
|
+
},
|
|
21222
|
+
provideDocumentRangeSemanticTokens: async (document, range, token, next) => {
|
|
21223
|
+
try {
|
|
21224
|
+
return await next(document, range, token);
|
|
21225
|
+
} finally {
|
|
21226
|
+
onServerResponse.fire();
|
|
21227
|
+
}
|
|
21228
|
+
},
|
|
21229
|
+
provideDocumentSemanticTokens: async (document, token, next) => {
|
|
21230
|
+
try {
|
|
21231
|
+
return await next(document, token);
|
|
21232
|
+
} finally {
|
|
21233
|
+
onServerResponse.fire();
|
|
21234
|
+
}
|
|
21235
|
+
},
|
|
21236
|
+
handleWorkDoneProgress: async (token, params, next) => {
|
|
21237
|
+
next(token, params);
|
|
21238
|
+
|
|
21239
|
+
if (params.kind === 'end') {
|
|
21240
|
+
onServerResponse.fire();
|
|
21241
|
+
}
|
|
21242
|
+
},
|
|
21243
|
+
provideHover: async (document, position, token, next) => {
|
|
21244
|
+
try {
|
|
21245
|
+
return await next(document, position, token);
|
|
21246
|
+
} finally {
|
|
21247
|
+
onServerResponse.fire();
|
|
21248
|
+
}
|
|
20929
21249
|
}
|
|
20930
21250
|
});
|
|
20931
21251
|
this.languageClient = languageClient;
|
|
20932
|
-
|
|
20933
|
-
if (this.configuration != null) {
|
|
20934
|
-
this.updateConfiguration(this.configuration);
|
|
20935
|
-
}
|
|
20936
|
-
|
|
20937
21252
|
let readyPromise = null;
|
|
20938
21253
|
languageClient.onDidChangeState(async state => {
|
|
20939
21254
|
switch (state.newState) {
|
|
@@ -20946,7 +21261,7 @@ class LanguageClientManager {
|
|
|
20946
21261
|
readyPromise = languageClient.onReady().then(async () => {
|
|
20947
21262
|
let disposable = null;
|
|
20948
21263
|
await Promise.race([new Promise(resolve => {
|
|
20949
|
-
disposable =
|
|
21264
|
+
disposable = onServerResponse.event(resolve);
|
|
20950
21265
|
}), delay$1(15000)]);
|
|
20951
21266
|
disposable.dispose();
|
|
20952
21267
|
}, error => {
|
|
@@ -20993,14 +21308,20 @@ class LanguageClientManager {
|
|
|
20993
21308
|
}
|
|
20994
21309
|
const languageClientManagerByLanguageId = {};
|
|
20995
21310
|
|
|
20996
|
-
function createLanguageClientManager(
|
|
20997
|
-
if (languageClientManagerByLanguageId[
|
|
20998
|
-
throw new Error("Language client for language ".concat(
|
|
21311
|
+
function createLanguageClientManager(id, sessionId, languageServerAddress, getSecurityToken, libraryUrls) {
|
|
21312
|
+
if (languageClientManagerByLanguageId[id] != null) {
|
|
21313
|
+
throw new Error("Language client for language ".concat(id, " already started"));
|
|
21314
|
+
}
|
|
21315
|
+
|
|
21316
|
+
const languageServerOptions = staticOptions[id];
|
|
21317
|
+
|
|
21318
|
+
if (languageServerOptions == null) {
|
|
21319
|
+
throw new Error("Unknown ".concat(id, " language server"));
|
|
20999
21320
|
}
|
|
21000
21321
|
|
|
21001
21322
|
installServices();
|
|
21002
|
-
const languageClientManager = new LanguageClientManager(
|
|
21003
|
-
languageClientManagerByLanguageId[
|
|
21323
|
+
const languageClientManager = new LanguageClientManager(id, sessionId, languageServerAddress, getSecurityToken, languageServerOptions, libraryUrls);
|
|
21324
|
+
languageClientManagerByLanguageId[id] = languageClientManager;
|
|
21004
21325
|
const textModelContentProviderDisposable = registerTextModelContentProvider('file', {
|
|
21005
21326
|
async provideTextContent(resource) {
|
|
21006
21327
|
try {
|
|
@@ -21014,7 +21335,7 @@ function createLanguageClientManager(languageServerUrl, getSecurityToken, langua
|
|
|
21014
21335
|
|
|
21015
21336
|
});
|
|
21016
21337
|
languageClientManager.onWillClose(() => {
|
|
21017
|
-
delete languageClientManagerByLanguageId[
|
|
21338
|
+
delete languageClientManagerByLanguageId[id];
|
|
21018
21339
|
textModelContentProviderDisposable.dispose();
|
|
21019
21340
|
});
|
|
21020
21341
|
return languageClientManager;
|