@codingame/monaco-vscode-api 1.67.16 → 1.67.17
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/README.md +31 -1
- package/dist/api.js +69 -68
- package/dist/{async-f842d13c.js → async-c7fd4178.js} +1 -1
- package/dist/configuration.js +115 -6
- package/dist/messages.js +18 -17
- package/dist/{missing-services-8687ea11.js → missing-services-597951f0.js} +1 -1
- package/dist/modelEditor.js +23 -22
- package/dist/monaco.d.ts +2683 -0
- package/dist/monaco.js +149 -0
- package/dist/position-291dfe99.js +3 -0
- package/dist/{services-7a462d46.js → services-9299c4ca.js} +2 -21
- package/dist/services.js +2 -1
- package/dist/tslib.es6-16b40665.js +21 -0
- package/package.json +8 -1
package/README.md
CHANGED
|
@@ -28,6 +28,8 @@ Services.install({
|
|
|
28
28
|
})
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
## Monaco standalone services
|
|
32
|
+
|
|
31
33
|
Also, monaco-editor use `standalone` versions or the vscode services, which are much simpler.
|
|
32
34
|
|
|
33
35
|
You may want to provide your custom implementations of them, especially for: `textModelService`, `codeEditorService` and `notificationService`. To do so, you can provide them as the third parameter while creating your first editor.
|
|
@@ -64,12 +66,40 @@ StandaloneServices.initialize({
|
|
|
64
66
|
// It will be called when for instance the user ctrl+click on an import
|
|
65
67
|
}),
|
|
66
68
|
...getMessageServiceOverride(document.body),
|
|
67
|
-
...getConfigurationServiceOverride(
|
|
69
|
+
...getConfigurationServiceOverride(() => userConfigurationJson, configurationChangeEvent)
|
|
68
70
|
})
|
|
69
71
|
```
|
|
70
72
|
|
|
71
73
|
Note: using `vscode/service-override/modelEditor`, you'll be able to use the `vscode.workspace.registerTextDocumentContentProvider` api
|
|
72
74
|
|
|
75
|
+
### Troubleshoot
|
|
76
|
+
|
|
77
|
+
`StandaloneServices.initialize` can only be called once (note that `monaco.editor.create` calls `StandaloneServices.initialize`).
|
|
78
|
+
|
|
79
|
+
Also, a service that is used cannot be overriden anymore. So `StandaloneServices.initialize` should be called as soon as possible to prevent most of the issues.
|
|
80
|
+
|
|
81
|
+
## Editor configuration
|
|
82
|
+
|
|
83
|
+
The editors created using `monaco.editor.create` don't use the configuration from the configurationService.
|
|
84
|
+
|
|
85
|
+
This library exposes functions to create editors binded on the configuration:
|
|
86
|
+
|
|
87
|
+
before:
|
|
88
|
+
```typescript
|
|
89
|
+
import * as monaco from 'monaco-editor'
|
|
90
|
+
monaco.editor.create(...)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
after:
|
|
94
|
+
```typescript
|
|
95
|
+
import { createConfiguredEditor } from 'vscode/monaco'
|
|
96
|
+
|
|
97
|
+
createConfiguredEditor(...)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`createConfiguredEditor` returns a subclass of what is returned by `monaco.editor.create`, the `updateOptions` method can still be used.
|
|
101
|
+
The only difference is that is will use the `configurationService` as a default configuration
|
|
102
|
+
|
|
73
103
|
### Installation
|
|
74
104
|
|
|
75
105
|
```bash
|
package/dist/api.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { E as Emitter, u as unsupported$1 } from './missing-services-
|
|
2
|
-
import { _ as __classPrivateFieldSet, a as __classPrivateFieldGet, b as __decorate, c as
|
|
1
|
+
import { E as Emitter, u as unsupported$1 } from './missing-services-597951f0.js';
|
|
2
|
+
import { _ as __classPrivateFieldSet, a as __classPrivateFieldGet, b as __decorate, c as __param } from './tslib.es6-16b40665.js';
|
|
3
|
+
import { c as coalesceInPlace, m as markAsFileSystemProviderError, F as FileSystemProviderErrorCode, S as SIDE_GROUP, A as ACTIVE_GROUP, C as CancellationTokenSource$1, d as delta$1, a as mapArrayOrNot, I as IProgressService, r as readonly, b as ITextFileService, e as IFileService, f as IWorkbenchEnvironmentService, g as IUriIdentityService, h as IWorkingCopyFileService, i as IPathService, j as disposed, k as IEditorService, l as IEditorGroupsService, n as IPaneCompositePartService, o as IProductService, p as ILanguageStatusService, q as IHostService, s as Services, t as FileType$1, u as FilePermission$1 } from './services-9299c4ca.js';
|
|
3
4
|
import { i as isStringArray, w as withUndefinedAsNull } from './types-371cc315.js';
|
|
4
5
|
import { illegalArgument, onUnexpectedError, canceled, transformErrorForSerialization, isCancellationError, onUnexpectedExternalError, CancellationError as CancellationError$1 } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
5
6
|
import { uriToFsPath, URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
@@ -16,6 +17,7 @@ import { MarkerSeverity, IMarkerService } from 'monaco-editor/esm/vs/platform/ma
|
|
|
16
17
|
import { parse, revive } from 'monaco-editor/esm/vs/base/common/marshalling.js';
|
|
17
18
|
import { cloneAndChange, deepFreeze, equals as equals$1, mixin, deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
18
19
|
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
20
|
+
import { P as Position$3 } from './position-291dfe99.js';
|
|
19
21
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
20
22
|
import { toErrorMessage } from 'monaco-editor/esm/vs/base/common/errorMessage.js';
|
|
21
23
|
import { ILogService, LogLevel as LogLevel$1, LogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
@@ -30,7 +32,7 @@ import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation
|
|
|
30
32
|
import { MirrorTextModel } from 'monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js';
|
|
31
33
|
import { ok } from 'monaco-editor/esm/vs/base/common/assert.js';
|
|
32
34
|
import { getWordAtText, ensureValidWordDefinition } from 'monaco-editor/esm/vs/editor/common/core/wordHelper.js';
|
|
33
|
-
import { a as asPromise, B as Barrier, r as raceCancellationError } from './async-
|
|
35
|
+
import { a as asPromise, B as Barrier, r as raceCancellationError } from './async-c7fd4178.js';
|
|
34
36
|
import { ThemeIcon as ThemeIcon$2 } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
|
|
35
37
|
import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
36
38
|
import { Severity as Severity$1, INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
|
@@ -686,7 +688,7 @@ _Disposable_callOnDispose = new WeakMap();
|
|
|
686
688
|
Disposable$1 = Disposable_1 = __decorate([
|
|
687
689
|
es5ClassCompat
|
|
688
690
|
], Disposable$1);
|
|
689
|
-
let Position$
|
|
691
|
+
let Position$2 = Position_1 = class Position {
|
|
690
692
|
constructor(line, character) {
|
|
691
693
|
if (line < 0) {
|
|
692
694
|
throw illegalArgument('line must be non-negative');
|
|
@@ -847,20 +849,20 @@ let Position$3 = Position_1 = class Position {
|
|
|
847
849
|
return { line: this.line, character: this.character };
|
|
848
850
|
}
|
|
849
851
|
};
|
|
850
|
-
Position$
|
|
852
|
+
Position$2 = Position_1 = __decorate([
|
|
851
853
|
es5ClassCompat
|
|
852
|
-
], Position$
|
|
854
|
+
], Position$2);
|
|
853
855
|
let Range$2 = Range_1 = class Range {
|
|
854
856
|
constructor(startLineOrStart, startColumnOrEnd, endLine, endColumn) {
|
|
855
857
|
let start;
|
|
856
858
|
let end;
|
|
857
859
|
if (typeof startLineOrStart === 'number' && typeof startColumnOrEnd === 'number' && typeof endLine === 'number' && typeof endColumn === 'number') {
|
|
858
|
-
start = new Position$
|
|
859
|
-
end = new Position$
|
|
860
|
+
start = new Position$2(startLineOrStart, startColumnOrEnd);
|
|
861
|
+
end = new Position$2(endLine, endColumn);
|
|
860
862
|
}
|
|
861
|
-
else if (Position$
|
|
862
|
-
start = Position$
|
|
863
|
-
end = Position$
|
|
863
|
+
else if (Position$2.isPosition(startLineOrStart) && Position$2.isPosition(startColumnOrEnd)) {
|
|
864
|
+
start = Position$2.of(startLineOrStart);
|
|
865
|
+
end = Position$2.of(startColumnOrEnd);
|
|
864
866
|
}
|
|
865
867
|
if (!start || !end) {
|
|
866
868
|
throw new Error('Invalid arguments');
|
|
@@ -881,8 +883,8 @@ let Range$2 = Range_1 = class Range {
|
|
|
881
883
|
if (!thing) {
|
|
882
884
|
return false;
|
|
883
885
|
}
|
|
884
|
-
return Position$
|
|
885
|
-
&& Position$
|
|
886
|
+
return Position$2.isPosition(thing.start)
|
|
887
|
+
&& Position$2.isPosition(thing.end);
|
|
886
888
|
}
|
|
887
889
|
static of(obj) {
|
|
888
890
|
if (obj instanceof Range_1) {
|
|
@@ -906,8 +908,8 @@ let Range$2 = Range_1 = class Range {
|
|
|
906
908
|
return this.contains(positionOrRange.start)
|
|
907
909
|
&& this.contains(positionOrRange.end);
|
|
908
910
|
}
|
|
909
|
-
else if (Position$
|
|
910
|
-
if (Position$
|
|
911
|
+
else if (Position$2.isPosition(positionOrRange)) {
|
|
912
|
+
if (Position$2.of(positionOrRange).isBefore(this._start)) {
|
|
911
913
|
return false;
|
|
912
914
|
}
|
|
913
915
|
if (this._end.isBefore(positionOrRange)) {
|
|
@@ -921,8 +923,8 @@ let Range$2 = Range_1 = class Range {
|
|
|
921
923
|
return this._start.isEqual(other._start) && this._end.isEqual(other._end);
|
|
922
924
|
}
|
|
923
925
|
intersection(other) {
|
|
924
|
-
const start = Position$
|
|
925
|
-
const end = Position$
|
|
926
|
+
const start = Position$2.Max(other.start, this._start);
|
|
927
|
+
const end = Position$2.Min(other.end, this._end);
|
|
926
928
|
if (start.isAfter(end)) {
|
|
927
929
|
return undefined;
|
|
928
930
|
}
|
|
@@ -937,8 +939,8 @@ let Range$2 = Range_1 = class Range {
|
|
|
937
939
|
else if (other.contains(this)) {
|
|
938
940
|
return other;
|
|
939
941
|
}
|
|
940
|
-
const start = Position$
|
|
941
|
-
const end = Position$
|
|
942
|
+
const start = Position$2.Min(other.start, this._start);
|
|
943
|
+
const end = Position$2.Max(other.end, this.end);
|
|
942
944
|
return (
|
|
943
945
|
new Range_1(start, end)
|
|
944
946
|
);
|
|
@@ -957,7 +959,7 @@ let Range$2 = Range_1 = class Range {
|
|
|
957
959
|
if (!startOrChange) {
|
|
958
960
|
start = this.start;
|
|
959
961
|
}
|
|
960
|
-
else if (Position$
|
|
962
|
+
else if (Position$2.isPosition(startOrChange)) {
|
|
961
963
|
start = startOrChange;
|
|
962
964
|
}
|
|
963
965
|
else {
|
|
@@ -983,12 +985,12 @@ let Selection$3 = Selection_1 = class Selection extends Range$2 {
|
|
|
983
985
|
let anchor;
|
|
984
986
|
let active;
|
|
985
987
|
if (typeof anchorLineOrAnchor === 'number' && typeof anchorColumnOrActive === 'number' && typeof activeLine === 'number' && typeof activeColumn === 'number') {
|
|
986
|
-
anchor = new Position$
|
|
987
|
-
active = new Position$
|
|
988
|
+
anchor = new Position$2(anchorLineOrAnchor, anchorColumnOrActive);
|
|
989
|
+
active = new Position$2(activeLine, activeColumn);
|
|
988
990
|
}
|
|
989
|
-
else if (Position$
|
|
990
|
-
anchor = Position$
|
|
991
|
-
active = Position$
|
|
991
|
+
else if (Position$2.isPosition(anchorLineOrAnchor) && Position$2.isPosition(anchorColumnOrActive)) {
|
|
992
|
+
anchor = Position$2.of(anchorLineOrAnchor);
|
|
993
|
+
active = Position$2.of(anchorColumnOrActive);
|
|
992
994
|
}
|
|
993
995
|
if (!anchor || !active) {
|
|
994
996
|
throw new Error('Invalid arguments');
|
|
@@ -1005,8 +1007,8 @@ let Selection$3 = Selection_1 = class Selection extends Range$2 {
|
|
|
1005
1007
|
return false;
|
|
1006
1008
|
}
|
|
1007
1009
|
return Range$2.isRange(thing)
|
|
1008
|
-
&& Position$
|
|
1009
|
-
&& Position$
|
|
1010
|
+
&& Position$2.isPosition(thing.anchor)
|
|
1011
|
+
&& Position$2.isPosition(thing.active)
|
|
1010
1012
|
&& typeof thing.isReversed === 'boolean';
|
|
1011
1013
|
}
|
|
1012
1014
|
get anchor() {
|
|
@@ -1068,7 +1070,7 @@ let TextEdit$2 = TextEdit_1 = class TextEdit {
|
|
|
1068
1070
|
return TextEdit_1.replace(range, '');
|
|
1069
1071
|
}
|
|
1070
1072
|
static setEndOfLine(eol) {
|
|
1071
|
-
const ret = new TextEdit_1( new Range$2( new Position$
|
|
1073
|
+
const ret = new TextEdit_1( new Range$2( new Position$2(0, 0), new Position$2(0, 0)), '');
|
|
1072
1074
|
ret.newEol = eol;
|
|
1073
1075
|
return ret;
|
|
1074
1076
|
}
|
|
@@ -1315,7 +1317,7 @@ let Location$1 = Location_1 = class Location {
|
|
|
1315
1317
|
else if (Range$2.isRange(rangeOrPosition)) {
|
|
1316
1318
|
this.range = Range$2.of(rangeOrPosition);
|
|
1317
1319
|
}
|
|
1318
|
-
else if (Position$
|
|
1320
|
+
else if (Position$2.isPosition(rangeOrPosition)) {
|
|
1319
1321
|
this.range = new Range$2(rangeOrPosition, rangeOrPosition);
|
|
1320
1322
|
}
|
|
1321
1323
|
else {
|
|
@@ -3257,8 +3259,8 @@ var Selection$2;
|
|
|
3257
3259
|
(function(Selection) {
|
|
3258
3260
|
function to(selection) {
|
|
3259
3261
|
const { selectionStartLineNumber, selectionStartColumn, positionLineNumber, positionColumn } = selection;
|
|
3260
|
-
const start = new Position$
|
|
3261
|
-
const end = new Position$
|
|
3262
|
+
const start = new Position$2(selectionStartLineNumber - 1, selectionStartColumn - 1);
|
|
3263
|
+
const end = new Position$2(positionLineNumber - 1, positionColumn - 1);
|
|
3262
3264
|
return new Selection$3(start, end);
|
|
3263
3265
|
}
|
|
3264
3266
|
Selection.to = to;
|
|
@@ -3309,17 +3311,17 @@ var TokenType;
|
|
|
3309
3311
|
}
|
|
3310
3312
|
TokenType.to = to;
|
|
3311
3313
|
})(TokenType || (TokenType = {}));
|
|
3312
|
-
var Position$
|
|
3314
|
+
var Position$1;
|
|
3313
3315
|
(function(Position) {
|
|
3314
3316
|
function to(position) {
|
|
3315
|
-
return new Position$
|
|
3317
|
+
return new Position$2(position.lineNumber - 1, position.column - 1);
|
|
3316
3318
|
}
|
|
3317
3319
|
Position.to = to;
|
|
3318
3320
|
function from(position) {
|
|
3319
3321
|
return { lineNumber: position.line + 1, column: position.character + 1 };
|
|
3320
3322
|
}
|
|
3321
3323
|
Position.from = from;
|
|
3322
|
-
})(Position$
|
|
3324
|
+
})(Position$1 || (Position$1 = {}));
|
|
3323
3325
|
var DocumentSelector;
|
|
3324
3326
|
(function(DocumentSelector) {
|
|
3325
3327
|
function from(value, uriTransformer) {
|
|
@@ -4901,7 +4903,6 @@ class ConsoleMainLogger extends AbstractLogger {
|
|
|
4901
4903
|
flush() {
|
|
4902
4904
|
}
|
|
4903
4905
|
}
|
|
4904
|
-
const Position$1 = monaco.Position;
|
|
4905
4906
|
const IExtHostRpcService = createDecorator('IExtHostRpcService');
|
|
4906
4907
|
var _ExtHostCommands_proxy;
|
|
4907
4908
|
let ExtHostCommands = class ExtHostCommands {
|
|
@@ -4928,8 +4929,8 @@ let ExtHostCommands = class ExtHostCommands {
|
|
|
4928
4929
|
if (Range$3.isIRange(obj)) {
|
|
4929
4930
|
return Range$1.to(obj);
|
|
4930
4931
|
}
|
|
4931
|
-
if (Position$
|
|
4932
|
-
return Position$
|
|
4932
|
+
if (Position$3.isIPosition(obj)) {
|
|
4933
|
+
return Position$1.to(obj);
|
|
4933
4934
|
}
|
|
4934
4935
|
if (Range$3.isIRange(obj.range) && URI.isUri(obj.uri)) {
|
|
4935
4936
|
return location.to(obj);
|
|
@@ -5000,8 +5001,8 @@ let ExtHostCommands = class ExtHostCommands {
|
|
|
5000
5001
|
else {
|
|
5001
5002
|
let hasBuffers = false;
|
|
5002
5003
|
const toArgs = cloneAndChange(args, function (value) {
|
|
5003
|
-
if (value instanceof Position$
|
|
5004
|
-
return Position$
|
|
5004
|
+
if (value instanceof Position$2) {
|
|
5005
|
+
return Position$1.from(value);
|
|
5005
5006
|
}
|
|
5006
5007
|
else if (value instanceof Range$2) {
|
|
5007
5008
|
return Range$1.from(value);
|
|
@@ -7500,7 +7501,7 @@ class ExtHostDocumentData extends MirrorTextModel {
|
|
|
7500
7501
|
}
|
|
7501
7502
|
_lineAt(lineOrPosition) {
|
|
7502
7503
|
let line;
|
|
7503
|
-
if (lineOrPosition instanceof Position$
|
|
7504
|
+
if (lineOrPosition instanceof Position$2) {
|
|
7504
7505
|
line = lineOrPosition.line;
|
|
7505
7506
|
}
|
|
7506
7507
|
else if (typeof lineOrPosition === 'number') {
|
|
@@ -7525,7 +7526,7 @@ class ExtHostDocumentData extends MirrorTextModel {
|
|
|
7525
7526
|
const out = this._lineStarts.getIndexOf(offset);
|
|
7526
7527
|
const lineLength = this._lines[out.index].length;
|
|
7527
7528
|
return (
|
|
7528
|
-
new Position$
|
|
7529
|
+
new Position$2(out.index, Math.min(out.remainder, lineLength))
|
|
7529
7530
|
);
|
|
7530
7531
|
}
|
|
7531
7532
|
_validateRange(range) {
|
|
@@ -7542,7 +7543,7 @@ class ExtHostDocumentData extends MirrorTextModel {
|
|
|
7542
7543
|
);
|
|
7543
7544
|
}
|
|
7544
7545
|
_validatePosition(position) {
|
|
7545
|
-
if (!(position instanceof Position$
|
|
7546
|
+
if (!(position instanceof Position$2)) {
|
|
7546
7547
|
throw new Error('Invalid argument');
|
|
7547
7548
|
}
|
|
7548
7549
|
if (this._lines.length === 0) {
|
|
@@ -7575,7 +7576,7 @@ class ExtHostDocumentData extends MirrorTextModel {
|
|
|
7575
7576
|
return position;
|
|
7576
7577
|
}
|
|
7577
7578
|
return (
|
|
7578
|
-
new Position$
|
|
7579
|
+
new Position$2(line, character)
|
|
7579
7580
|
);
|
|
7580
7581
|
}
|
|
7581
7582
|
_getWordRangeAtPosition(_position, regexp) {
|
|
@@ -9339,7 +9340,7 @@ class TextEditorEdit {
|
|
|
9339
9340
|
replace(location, value) {
|
|
9340
9341
|
this._throwIfFinalized();
|
|
9341
9342
|
let range = null;
|
|
9342
|
-
if (location instanceof Position$
|
|
9343
|
+
if (location instanceof Position$2) {
|
|
9343
9344
|
range = new Range$2(location, location);
|
|
9344
9345
|
}
|
|
9345
9346
|
else if (location instanceof Range$2) {
|
|
@@ -9616,8 +9617,8 @@ class ExtHostTextEditor {
|
|
|
9616
9617
|
if (!where || (Array.isArray(where) && where.length === 0)) {
|
|
9617
9618
|
ranges = that._selections.map(range => Range$1.from(range));
|
|
9618
9619
|
}
|
|
9619
|
-
else if (where instanceof Position$
|
|
9620
|
-
const { lineNumber, column } = Position$
|
|
9620
|
+
else if (where instanceof Position$2) {
|
|
9621
|
+
const { lineNumber, column } = Position$1.from(where);
|
|
9621
9622
|
ranges = [{ startLineNumber: lineNumber, startColumn: column, endLineNumber: lineNumber, endColumn: column }];
|
|
9622
9623
|
}
|
|
9623
9624
|
else if (where instanceof Range$2) {
|
|
@@ -9630,7 +9631,7 @@ class ExtHostTextEditor {
|
|
|
9630
9631
|
ranges.push(Range$1.from(posOrRange));
|
|
9631
9632
|
}
|
|
9632
9633
|
else {
|
|
9633
|
-
const { lineNumber, column } = Position$
|
|
9634
|
+
const { lineNumber, column } = Position$1.from(posOrRange);
|
|
9634
9635
|
ranges.push({ startLineNumber: lineNumber, startColumn: column, endLineNumber: lineNumber, endColumn: column });
|
|
9635
9636
|
}
|
|
9636
9637
|
}
|
|
@@ -11605,7 +11606,7 @@ class ExtHostLanguages {
|
|
|
11605
11606
|
}
|
|
11606
11607
|
async tokenAtPosition(document, position) {
|
|
11607
11608
|
const versionNow = document.version;
|
|
11608
|
-
const pos = Position$
|
|
11609
|
+
const pos = Position$1.from(position);
|
|
11609
11610
|
const info = await this._proxy.$tokensAtPosition(document.uri, pos);
|
|
11610
11611
|
const defaultRange = {
|
|
11611
11612
|
type: StandardTokenType.Other,
|
|
@@ -12201,7 +12202,7 @@ class DefinitionAdapter {
|
|
|
12201
12202
|
}
|
|
12202
12203
|
async provideDefinition(resource, position, token) {
|
|
12203
12204
|
const doc = this._documents.getDocument(resource);
|
|
12204
|
-
const pos = Position$
|
|
12205
|
+
const pos = Position$1.to(position);
|
|
12205
12206
|
const value = await this._provider.provideDefinition(doc, pos, token);
|
|
12206
12207
|
return convertToLocationLinks(value);
|
|
12207
12208
|
}
|
|
@@ -12213,7 +12214,7 @@ class DeclarationAdapter {
|
|
|
12213
12214
|
}
|
|
12214
12215
|
async provideDeclaration(resource, position, token) {
|
|
12215
12216
|
const doc = this._documents.getDocument(resource);
|
|
12216
|
-
const pos = Position$
|
|
12217
|
+
const pos = Position$1.to(position);
|
|
12217
12218
|
const value = await this._provider.provideDeclaration(doc, pos, token);
|
|
12218
12219
|
return convertToLocationLinks(value);
|
|
12219
12220
|
}
|
|
@@ -12225,7 +12226,7 @@ class ImplementationAdapter {
|
|
|
12225
12226
|
}
|
|
12226
12227
|
async provideImplementation(resource, position, token) {
|
|
12227
12228
|
const doc = this._documents.getDocument(resource);
|
|
12228
|
-
const pos = Position$
|
|
12229
|
+
const pos = Position$1.to(position);
|
|
12229
12230
|
const value = await this._provider.provideImplementation(doc, pos, token);
|
|
12230
12231
|
return convertToLocationLinks(value);
|
|
12231
12232
|
}
|
|
@@ -12237,7 +12238,7 @@ class TypeDefinitionAdapter {
|
|
|
12237
12238
|
}
|
|
12238
12239
|
async provideTypeDefinition(resource, position, token) {
|
|
12239
12240
|
const doc = this._documents.getDocument(resource);
|
|
12240
|
-
const pos = Position$
|
|
12241
|
+
const pos = Position$1.to(position);
|
|
12241
12242
|
const value = await this._provider.provideTypeDefinition(doc, pos, token);
|
|
12242
12243
|
return convertToLocationLinks(value);
|
|
12243
12244
|
}
|
|
@@ -12249,7 +12250,7 @@ class HoverAdapter {
|
|
|
12249
12250
|
}
|
|
12250
12251
|
async provideHover(resource, position, token) {
|
|
12251
12252
|
const doc = this._documents.getDocument(resource);
|
|
12252
|
-
const pos = Position$
|
|
12253
|
+
const pos = Position$1.to(position);
|
|
12253
12254
|
const value = await this._provider.provideHover(doc, pos, token);
|
|
12254
12255
|
if (!value || isFalsyOrEmpty(value.contents)) {
|
|
12255
12256
|
return undefined;
|
|
@@ -12270,7 +12271,7 @@ class EvaluatableExpressionAdapter {
|
|
|
12270
12271
|
}
|
|
12271
12272
|
async provideEvaluatableExpression(resource, position, token) {
|
|
12272
12273
|
const doc = this._documents.getDocument(resource);
|
|
12273
|
-
const pos = Position$
|
|
12274
|
+
const pos = Position$1.to(position);
|
|
12274
12275
|
const value = await this._provider.provideEvaluatableExpression(doc, pos, token);
|
|
12275
12276
|
if (value) {
|
|
12276
12277
|
return EvaluatableExpression$1.from(value);
|
|
@@ -12299,7 +12300,7 @@ class DocumentHighlightAdapter {
|
|
|
12299
12300
|
}
|
|
12300
12301
|
async provideDocumentHighlights(resource, position, token) {
|
|
12301
12302
|
const doc = this._documents.getDocument(resource);
|
|
12302
|
-
const pos = Position$
|
|
12303
|
+
const pos = Position$1.to(position);
|
|
12303
12304
|
const value = await this._provider.provideDocumentHighlights(doc, pos, token);
|
|
12304
12305
|
if (Array.isArray(value)) {
|
|
12305
12306
|
return value.map(DocumentHighlight$1.from);
|
|
@@ -12314,7 +12315,7 @@ class LinkedEditingRangeAdapter {
|
|
|
12314
12315
|
}
|
|
12315
12316
|
async provideLinkedEditingRanges(resource, position, token) {
|
|
12316
12317
|
const doc = this._documents.getDocument(resource);
|
|
12317
|
-
const pos = Position$
|
|
12318
|
+
const pos = Position$1.to(position);
|
|
12318
12319
|
const value = await this._provider.provideLinkedEditingRanges(doc, pos, token);
|
|
12319
12320
|
if (value && Array.isArray(value.ranges)) {
|
|
12320
12321
|
return {
|
|
@@ -12332,7 +12333,7 @@ class ReferenceAdapter {
|
|
|
12332
12333
|
}
|
|
12333
12334
|
async provideReferences(resource, position, context, token) {
|
|
12334
12335
|
const doc = this._documents.getDocument(resource);
|
|
12335
|
-
const pos = Position$
|
|
12336
|
+
const pos = Position$1.to(position);
|
|
12336
12337
|
const value = await this._provider.provideReferences(doc, pos, context, token);
|
|
12337
12338
|
if (Array.isArray(value)) {
|
|
12338
12339
|
return value.map(location.from);
|
|
@@ -12476,7 +12477,7 @@ class OnTypeFormattingAdapter {
|
|
|
12476
12477
|
}
|
|
12477
12478
|
async provideOnTypeFormattingEdits(resource, position, ch, options, token) {
|
|
12478
12479
|
const document = this._documents.getDocument(resource);
|
|
12479
|
-
const pos = Position$
|
|
12480
|
+
const pos = Position$1.to(position);
|
|
12480
12481
|
const value = await this._provider.provideOnTypeFormattingEdits(document, pos, ch, options, token);
|
|
12481
12482
|
if (Array.isArray(value)) {
|
|
12482
12483
|
return value.map(TextEdit$1.from);
|
|
@@ -12542,7 +12543,7 @@ class RenameAdapter {
|
|
|
12542
12543
|
}
|
|
12543
12544
|
async provideRenameEdits(resource, position, newName, token) {
|
|
12544
12545
|
const doc = this._documents.getDocument(resource);
|
|
12545
|
-
const pos = Position$
|
|
12546
|
+
const pos = Position$1.to(position);
|
|
12546
12547
|
try {
|
|
12547
12548
|
const value = await this._provider.provideRenameEdits(doc, pos, newName, token);
|
|
12548
12549
|
if (!value) {
|
|
@@ -12565,7 +12566,7 @@ class RenameAdapter {
|
|
|
12565
12566
|
return Promise.resolve(undefined);
|
|
12566
12567
|
}
|
|
12567
12568
|
const doc = this._documents.getDocument(resource);
|
|
12568
|
-
const pos = Position$
|
|
12569
|
+
const pos = Position$1.to(position);
|
|
12569
12570
|
try {
|
|
12570
12571
|
const rangeOrLocation = await this._provider.prepareRename(doc, pos, token);
|
|
12571
12572
|
let range;
|
|
@@ -12773,7 +12774,7 @@ class SuggestAdapter {
|
|
|
12773
12774
|
}
|
|
12774
12775
|
async provideCompletionItems(resource, position, context, token) {
|
|
12775
12776
|
const doc = this._documents.getDocument(resource);
|
|
12776
|
-
const pos = Position$
|
|
12777
|
+
const pos = Position$1.to(position);
|
|
12777
12778
|
const replaceRange = doc.getWordRangeAtPosition(pos) || new Range$2(pos, pos);
|
|
12778
12779
|
const insertRange = replaceRange.with({ end: pos });
|
|
12779
12780
|
const sw = new StopWatch(true);
|
|
@@ -12882,7 +12883,7 @@ class InlineCompletionAdapter {
|
|
|
12882
12883
|
}
|
|
12883
12884
|
async provideInlineCompletions(resource, position, context, token) {
|
|
12884
12885
|
const doc = this._documents.getDocument(resource);
|
|
12885
|
-
const pos = Position$
|
|
12886
|
+
const pos = Position$1.to(position);
|
|
12886
12887
|
const result = await this._provider.provideInlineCompletionItems(doc, pos, {
|
|
12887
12888
|
selectedCompletionInfo: context.selectedSuggestionInfo
|
|
12888
12889
|
? {
|
|
@@ -12971,7 +12972,7 @@ class SignatureHelpAdapter {
|
|
|
12971
12972
|
}
|
|
12972
12973
|
async provideSignatureHelp(resource, position, context, token) {
|
|
12973
12974
|
const doc = this._documents.getDocument(resource);
|
|
12974
|
-
const pos = Position$
|
|
12975
|
+
const pos = Position$1.to(position);
|
|
12975
12976
|
const vscodeContext = this.reviveContext(context);
|
|
12976
12977
|
const value = await this._provider.provideSignatureHelp(doc, pos, token, vscodeContext);
|
|
12977
12978
|
if (value) {
|
|
@@ -13073,7 +13074,7 @@ class InlayHintsAdapter {
|
|
|
13073
13074
|
label: '',
|
|
13074
13075
|
cacheId: id,
|
|
13075
13076
|
tooltip: MarkdownString$1.fromStrict(hint.tooltip),
|
|
13076
|
-
position: Position$
|
|
13077
|
+
position: Position$1.from(hint.position),
|
|
13077
13078
|
kind: hint.kind && InlayHintKind$1.from(hint.kind),
|
|
13078
13079
|
paddingLeft: hint.paddingLeft,
|
|
13079
13080
|
paddingRight: hint.paddingRight,
|
|
@@ -13206,7 +13207,7 @@ class SelectionRangeAdapter {
|
|
|
13206
13207
|
}
|
|
13207
13208
|
async provideSelectionRanges(resource, pos, token) {
|
|
13208
13209
|
const document = this._documents.getDocument(resource);
|
|
13209
|
-
const positions = pos.map(Position$
|
|
13210
|
+
const positions = pos.map(Position$1.to);
|
|
13210
13211
|
const allProviderRanges = await this._provider.provideSelectionRanges(document, positions, token);
|
|
13211
13212
|
if (!isNonEmptyArray(allProviderRanges)) {
|
|
13212
13213
|
return [];
|
|
@@ -13245,7 +13246,7 @@ class CallHierarchyAdapter {
|
|
|
13245
13246
|
}
|
|
13246
13247
|
async prepareSession(uri, position, token) {
|
|
13247
13248
|
const doc = this._documents.getDocument(uri);
|
|
13248
|
-
const pos = Position$
|
|
13249
|
+
const pos = Position$1.to(position);
|
|
13249
13250
|
const items = await this._provider.prepareCallHierarchy(doc, pos, token);
|
|
13250
13251
|
if (!items) {
|
|
13251
13252
|
return undefined;
|
|
@@ -13314,7 +13315,7 @@ class TypeHierarchyAdapter {
|
|
|
13314
13315
|
}
|
|
13315
13316
|
async prepareSession(uri, position, token) {
|
|
13316
13317
|
const doc = this._documents.getDocument(uri);
|
|
13317
|
-
const pos = Position$
|
|
13318
|
+
const pos = Position$1.to(position);
|
|
13318
13319
|
const items = await this._provider.prepareTypeHierarchy(doc, pos, token);
|
|
13319
13320
|
if (!items) {
|
|
13320
13321
|
return undefined;
|
|
@@ -15876,7 +15877,7 @@ const api = {
|
|
|
15876
15877
|
MarkdownString: MarkdownString$2,
|
|
15877
15878
|
OverviewRulerLane: OverviewRulerLane$1,
|
|
15878
15879
|
ParameterInformation: ParameterInformation$2,
|
|
15879
|
-
Position: Position$
|
|
15880
|
+
Position: Position$2,
|
|
15880
15881
|
ProcessExecution: ProcessExecution$1,
|
|
15881
15882
|
ProgressLocation: ProgressLocation$2,
|
|
15882
15883
|
QuickInputButtons: QuickInputButtons$1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Emitter } from './missing-services-
|
|
1
|
+
import { E as Emitter } from './missing-services-597951f0.js';
|
|
2
2
|
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
3
3
|
import { extUri } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
4
4
|
import { CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|