@codingame/monaco-vscode-api 1.67.5 → 1.67.8
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 +12 -4
- package/dist/api.amd.js +36 -39
- package/dist/api.cjs +36 -39
- package/dist/api.js +36 -39
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
# @codingame/monaco-vscode-api · [](https://www.npmjs.com/package/@codingame/monaco-vscode-api) [](https://www.npmjs.com/package/@codingame/monaco-vscode-api) [](https://github.com/codingame/monaco-vscode-api/pulls)
|
|
2
2
|
|
|
3
|
-
[NPM module](https://www.npmjs.com/) that
|
|
3
|
+
[NPM module](https://www.npmjs.com/) that implements the VSCode api and redirects calls to Monaco editor.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The VSCode api is composed of:
|
|
6
|
+
|
|
7
|
+
- A lot of classes and tools, which are exported the same way as in VSCode.
|
|
8
|
+
- Some features that are supported by Monaco (Language feature registrations...) which are just forwarded to it (with some transformations)
|
|
9
|
+
- Some features that are not supported by Monaco, and in such case:
|
|
10
|
+
- If it's an important feature: we let the user implement it as they wish.
|
|
11
|
+
- If it's some advanced features that don't make a lot of sense on Monaco (debug, tests...), it just throws an error when you try to use it.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
To implement by hands the optional features (type hierarchy, call hierarchy...), you can use the `Services` namespace from `vscode/services`:
|
|
6
15
|
```typescript
|
|
7
16
|
import { Services } from 'vscode/services'
|
|
8
17
|
Services.install({
|
|
@@ -25,7 +34,7 @@ npm install -D @types/vscode
|
|
|
25
34
|
|
|
26
35
|
### Usage
|
|
27
36
|
|
|
28
|
-
Just import it as if you were in a vscode
|
|
37
|
+
Just import it as if you were in a vscode extension:
|
|
29
38
|
|
|
30
39
|
```typescript
|
|
31
40
|
import * as vscode from 'vscode'
|
|
@@ -33,4 +42,3 @@ import * as vscode from 'vscode'
|
|
|
33
42
|
const range = new new vscode.Range(...)
|
|
34
43
|
vscode.languages.registerCompletionItemProvider(...)
|
|
35
44
|
```
|
|
36
|
-
|
package/dist/api.amd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/esm/vs/base/common/uri.js', 'monaco-editor/esm/vs/base/common/arrays.js', 'monaco-editor/esm/vs/base/common/htmlContent.js', 'monaco-editor/esm/vs/base/common/uuid.js', 'monaco-editor/esm/vs/base/common/strings.js', 'monaco-editor/esm/vs/base/common/mime.js', 'monaco-editor/esm/vs/base/common/types.js', 'monaco-editor/esm/vs/base/common/map.js', 'monaco-editor
|
|
1
|
+
define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/esm/vs/base/common/uri.js', 'monaco-editor/esm/vs/base/common/arrays.js', 'monaco-editor/esm/vs/base/common/htmlContent.js', 'monaco-editor/esm/vs/base/common/uuid.js', 'monaco-editor/esm/vs/base/common/strings.js', 'monaco-editor/esm/vs/base/common/mime.js', 'monaco-editor/esm/vs/base/common/types.js', 'monaco-editor/esm/vs/base/common/map.js', 'monaco-editor', './services.amd', 'monaco-editor/esm/vs/base/common/event.js', 'monaco-editor/esm/vs/base/common/severity.js', 'monaco-editor/esm/vs/base/common/marked/marked.js', 'monaco-editor/esm/vs/platform/markers/common/markers.js', 'monaco-editor/esm/vs/base/common/marshalling.js', 'monaco-editor/esm/vs/base/common/objects.js', 'monaco-editor/esm/vs/editor/browser/services/bulkEditService.js', 'monaco-editor/esm/vs/base/common/errorMessage.js', 'monaco-editor/esm/vs/base/common/lifecycle.js', 'monaco-editor/esm/vs/platform/commands/common/commands.js', 'monaco-editor/esm/vs/nls.js', 'monaco-editor/esm/vs/base/common/network.js', 'monaco-editor/esm/vs/base/common/resources.js', 'monaco-editor/esm/vs/base/common/async.js', 'monaco-editor/esm/vs/base/common/cancellation.js', 'monaco-editor/esm/vs/editor/common/model/mirrorTextModel.js', 'monaco-editor/esm/vs/base/common/assert.js', 'monaco-editor/esm/vs/editor/common/core/wordHelper.js', 'monaco-editor/esm/vs/platform/extensions/common/extensions.js', 'monaco-editor/esm/vs/platform/log/common/log.js', 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js', 'monaco-editor/esm/vs/editor/common/services/semanticTokensDto.js', 'monaco-editor/esm/vs/base/common/idGenerator.js', 'monaco-editor/esm/vs/base/common/stopwatch.js', 'monaco-editor/esm/vs/editor/common/languages.js', 'monaco-editor/esm/vs/editor/common/languageFeatureRegistry.js', 'monaco-editor/esm/vs/base/common/platform.js', 'monaco-editor/esm/vs/editor/common/languageSelector.js'], (function (exports, errors_js, uri_js, arrays_js, htmlContent_js, uuid_js, strings_js, mime_js, types_js, map_js, monaco, services, event_js, Severity, marked_js, markers_js, marshalling_js, objects_js, bulkEditService_js, errorMessage_js, lifecycle_js, commands_js, nls_js, network_js, resources_js, async_js, cancellation_js, mirrorTextModel_js, assert_js, wordHelper_js, extensions_js, log_js, standaloneServices_js, semanticTokensDto_js, idGenerator_js, stopwatch_js, languages_js, languageFeatureRegistry_js, platform_js, languageSelector_js) { 'use strict';
|
|
2
2
|
|
|
3
3
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
4
4
|
|
|
@@ -4639,7 +4639,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
4639
4639
|
this._argumentProcessors.push(processor);
|
|
4640
4640
|
}
|
|
4641
4641
|
registerApiCommand(apiCommand) {
|
|
4642
|
-
const registration =
|
|
4642
|
+
const registration = this.registerCommand(false, apiCommand.id, async (...apiArgs) => {
|
|
4643
4643
|
const internalArgs = apiCommand.args.map((arg, i) => {
|
|
4644
4644
|
if (!arg.validate(apiArgs[i])) {
|
|
4645
4645
|
throw new Error(`Invalid argument '${arg.name}' when running '${apiCommand.id}', received: ${apiArgs[i]}`);
|
|
@@ -4821,6 +4821,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
4821
4821
|
this.delegatingCommandId = `_vscode_delegate_cmd_${Date.now().toString(36)}`;
|
|
4822
4822
|
this._cache = /*#__PURE__*/ new Map();
|
|
4823
4823
|
this._cachIdPool = 0;
|
|
4824
|
+
this._commands.registerCommand(true, this.delegatingCommandId, this._executeConvertedCommand, this);
|
|
4824
4825
|
}
|
|
4825
4826
|
toInternal(command, disposables) {
|
|
4826
4827
|
if (!command) {
|
|
@@ -7477,11 +7478,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
7477
7478
|
return data.document;
|
|
7478
7479
|
}
|
|
7479
7480
|
getDocumentData(resource) {
|
|
7480
|
-
|
|
7481
|
-
if (model == null) {
|
|
7482
|
-
throw new Error(`Unable to retrieve document from URI '${resource}'`);
|
|
7483
|
-
}
|
|
7484
|
-
return createDocumentDataFromModel(model);
|
|
7481
|
+
return this.documentsData.get(resource.toString());
|
|
7485
7482
|
}
|
|
7486
7483
|
get onDidAddDocument() { return this._onDidAddDocument.event; }
|
|
7487
7484
|
get onDidRemoveDocument() { return this._onDidRemoveDocument.event; }
|
|
@@ -9907,7 +9904,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
9907
9904
|
return data;
|
|
9908
9905
|
}
|
|
9909
9906
|
$registerDocumentSymbolProvider(handle, selector, displayName) {
|
|
9910
|
-
this._registrations.set(handle,
|
|
9907
|
+
this._registrations.set(handle, this._languageFeaturesService.documentSymbolProvider.register(selector, {
|
|
9911
9908
|
displayName,
|
|
9912
9909
|
provideDocumentSymbols: (model, token) => {
|
|
9913
9910
|
return this._proxy.$provideDocumentSymbols(handle, model.uri, token);
|
|
@@ -9935,7 +9932,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
9935
9932
|
this._registrations.set(eventHandle, emitter);
|
|
9936
9933
|
provider.onDidChange = emitter.event;
|
|
9937
9934
|
}
|
|
9938
|
-
this._registrations.set(handle,
|
|
9935
|
+
this._registrations.set(handle, this._languageFeaturesService.codeLensProvider.register(selector, provider));
|
|
9939
9936
|
}
|
|
9940
9937
|
$emitCodeLensEvent(eventHandle, event) {
|
|
9941
9938
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -9944,42 +9941,42 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
9944
9941
|
}
|
|
9945
9942
|
}
|
|
9946
9943
|
$registerDefinitionSupport(handle, selector) {
|
|
9947
|
-
this._registrations.set(handle,
|
|
9944
|
+
this._registrations.set(handle, this._languageFeaturesService.definitionProvider.register(selector, {
|
|
9948
9945
|
provideDefinition: (model, position, token) => {
|
|
9949
9946
|
return this._proxy.$provideDefinition(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
9950
9947
|
}
|
|
9951
9948
|
}));
|
|
9952
9949
|
}
|
|
9953
9950
|
$registerDeclarationSupport(handle, selector) {
|
|
9954
|
-
this._registrations.set(handle,
|
|
9951
|
+
this._registrations.set(handle, this._languageFeaturesService.declarationProvider.register(selector, {
|
|
9955
9952
|
provideDeclaration: (model, position, token) => {
|
|
9956
9953
|
return this._proxy.$provideDeclaration(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
9957
9954
|
}
|
|
9958
9955
|
}));
|
|
9959
9956
|
}
|
|
9960
9957
|
$registerImplementationSupport(handle, selector) {
|
|
9961
|
-
this._registrations.set(handle,
|
|
9958
|
+
this._registrations.set(handle, this._languageFeaturesService.implementationProvider.register(selector, {
|
|
9962
9959
|
provideImplementation: (model, position, token) => {
|
|
9963
9960
|
return this._proxy.$provideImplementation(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
9964
9961
|
}
|
|
9965
9962
|
}));
|
|
9966
9963
|
}
|
|
9967
9964
|
$registerTypeDefinitionSupport(handle, selector) {
|
|
9968
|
-
this._registrations.set(handle,
|
|
9965
|
+
this._registrations.set(handle, this._languageFeaturesService.typeDefinitionProvider.register(selector, {
|
|
9969
9966
|
provideTypeDefinition: (model, position, token) => {
|
|
9970
9967
|
return this._proxy.$provideTypeDefinition(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
9971
9968
|
}
|
|
9972
9969
|
}));
|
|
9973
9970
|
}
|
|
9974
9971
|
$registerHoverProvider(handle, selector) {
|
|
9975
|
-
this._registrations.set(handle,
|
|
9972
|
+
this._registrations.set(handle, this._languageFeaturesService.hoverProvider.register(selector, {
|
|
9976
9973
|
provideHover: (model, position, token) => {
|
|
9977
9974
|
return this._proxy.$provideHover(handle, model.uri, position, token);
|
|
9978
9975
|
}
|
|
9979
9976
|
}));
|
|
9980
9977
|
}
|
|
9981
9978
|
$registerEvaluatableExpressionProvider(handle, selector) {
|
|
9982
|
-
this._registrations.set(handle,
|
|
9979
|
+
this._registrations.set(handle, this._languageFeaturesService.evaluatableExpressionProvider.register(selector, {
|
|
9983
9980
|
provideEvaluatableExpression: (model, position, token) => {
|
|
9984
9981
|
return this._proxy.$provideEvaluatableExpression(handle, model.uri, position, token);
|
|
9985
9982
|
}
|
|
@@ -9996,7 +9993,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
9996
9993
|
this._registrations.set(eventHandle, emitter);
|
|
9997
9994
|
provider.onDidChangeInlineValues = emitter.event;
|
|
9998
9995
|
}
|
|
9999
|
-
this._registrations.set(handle,
|
|
9996
|
+
this._registrations.set(handle, this._languageFeaturesService.inlineValuesProvider.register(selector, provider));
|
|
10000
9997
|
}
|
|
10001
9998
|
$emitInlineValuesEvent(eventHandle, event) {
|
|
10002
9999
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10005,14 +10002,14 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10005
10002
|
}
|
|
10006
10003
|
}
|
|
10007
10004
|
$registerDocumentHighlightProvider(handle, selector) {
|
|
10008
|
-
this._registrations.set(handle,
|
|
10005
|
+
this._registrations.set(handle, this._languageFeaturesService.documentHighlightProvider.register(selector, {
|
|
10009
10006
|
provideDocumentHighlights: (model, position, token) => {
|
|
10010
10007
|
return this._proxy.$provideDocumentHighlights(handle, model.uri, position, token);
|
|
10011
10008
|
}
|
|
10012
10009
|
}));
|
|
10013
10010
|
}
|
|
10014
10011
|
$registerLinkedEditingRangeProvider(handle, selector) {
|
|
10015
|
-
this._registrations.set(handle,
|
|
10012
|
+
this._registrations.set(handle, this._languageFeaturesService.linkedEditingRangeProvider.register(selector, {
|
|
10016
10013
|
provideLinkedEditingRanges: async (model, position, token) => {
|
|
10017
10014
|
const res = await this._proxy.$provideLinkedEditingRanges(handle, model.uri, position, token);
|
|
10018
10015
|
if (res) {
|
|
@@ -10026,7 +10023,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10026
10023
|
}));
|
|
10027
10024
|
}
|
|
10028
10025
|
$registerReferenceSupport(handle, selector) {
|
|
10029
|
-
this._registrations.set(handle,
|
|
10026
|
+
this._registrations.set(handle, this._languageFeaturesService.referenceProvider.register(selector, {
|
|
10030
10027
|
provideReferences: (model, position, context, token) => {
|
|
10031
10028
|
return this._proxy.$provideReferences(handle, model.uri, position, context, token).then(MainThreadLanguageFeatures_1._reviveLocationDto);
|
|
10032
10029
|
}
|
|
@@ -10059,10 +10056,10 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10059
10056
|
return codeAction;
|
|
10060
10057
|
};
|
|
10061
10058
|
}
|
|
10062
|
-
this._registrations.set(handle,
|
|
10059
|
+
this._registrations.set(handle, this._languageFeaturesService.codeActionProvider.register(selector, provider));
|
|
10063
10060
|
}
|
|
10064
10061
|
$registerDocumentFormattingSupport(handle, selector, extensionId, displayName) {
|
|
10065
|
-
this._registrations.set(handle,
|
|
10062
|
+
this._registrations.set(handle, this._languageFeaturesService.documentFormattingEditProvider.register(selector, {
|
|
10066
10063
|
extensionId,
|
|
10067
10064
|
displayName,
|
|
10068
10065
|
provideDocumentFormattingEdits: (model, options, token) => {
|
|
@@ -10071,7 +10068,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10071
10068
|
}));
|
|
10072
10069
|
}
|
|
10073
10070
|
$registerRangeFormattingSupport(handle, selector, extensionId, displayName) {
|
|
10074
|
-
this._registrations.set(handle,
|
|
10071
|
+
this._registrations.set(handle, this._languageFeaturesService.documentRangeFormattingEditProvider.register(selector, {
|
|
10075
10072
|
extensionId,
|
|
10076
10073
|
displayName,
|
|
10077
10074
|
provideDocumentRangeFormattingEdits: (model, range, options, token) => {
|
|
@@ -10080,7 +10077,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10080
10077
|
}));
|
|
10081
10078
|
}
|
|
10082
10079
|
$registerOnTypeFormattingSupport(handle, selector, autoFormatTriggerCharacters, extensionId) {
|
|
10083
|
-
this._registrations.set(handle,
|
|
10080
|
+
this._registrations.set(handle, this._languageFeaturesService.onTypeFormattingEditProvider.register(selector, {
|
|
10084
10081
|
extensionId,
|
|
10085
10082
|
autoFormatTriggerCharacters,
|
|
10086
10083
|
provideOnTypeFormattingEdits: (model, position, ch, options, token) => {
|
|
@@ -10106,10 +10103,10 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10106
10103
|
return resolvedItem && MainThreadLanguageFeatures_1._reviveWorkspaceSymbolDto(resolvedItem);
|
|
10107
10104
|
};
|
|
10108
10105
|
}
|
|
10109
|
-
this._registrations.set(handle,
|
|
10106
|
+
this._registrations.set(handle, WorkspaceSymbolProviderRegistry.register(provider));
|
|
10110
10107
|
}
|
|
10111
10108
|
$registerRenameSupport(handle, selector, supportResolveLocation) {
|
|
10112
|
-
this._registrations.set(handle,
|
|
10109
|
+
this._registrations.set(handle, this._languageFeaturesService.renameProvider.register(selector, {
|
|
10113
10110
|
provideRenameEdits: (model, position, newName, token) => {
|
|
10114
10111
|
return this._proxy.$provideRenameEdits(handle, model.uri, position, newName, token).then(reviveWorkspaceEditDto);
|
|
10115
10112
|
},
|
|
@@ -10125,7 +10122,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10125
10122
|
this._registrations.set(eventHandle, emitter);
|
|
10126
10123
|
event = emitter.event;
|
|
10127
10124
|
}
|
|
10128
|
-
this._registrations.set(handle,
|
|
10125
|
+
this._registrations.set(handle, this._languageFeaturesService.documentSemanticTokensProvider.register(selector, /*#__PURE__*/ new MainThreadDocumentSemanticTokensProvider(this._proxy, handle, legend, event)));
|
|
10129
10126
|
}
|
|
10130
10127
|
$emitDocumentSemanticTokensEvent(eventHandle) {
|
|
10131
10128
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10134,7 +10131,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10134
10131
|
}
|
|
10135
10132
|
}
|
|
10136
10133
|
$registerDocumentRangeSemanticTokensProvider(handle, selector, legend) {
|
|
10137
|
-
this._registrations.set(handle,
|
|
10134
|
+
this._registrations.set(handle, this._languageFeaturesService.documentRangeSemanticTokensProvider.register(selector, /*#__PURE__*/ new MainThreadDocumentRangeSemanticTokensProvider(this._proxy, handle, legend)));
|
|
10138
10135
|
}
|
|
10139
10136
|
static _inflateSuggestDto(defaultRange, data) {
|
|
10140
10137
|
const label = data["a" ];
|
|
@@ -10188,7 +10185,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10188
10185
|
});
|
|
10189
10186
|
};
|
|
10190
10187
|
}
|
|
10191
|
-
this._registrations.set(handle,
|
|
10188
|
+
this._registrations.set(handle, this._languageFeaturesService.completionProvider.register(selector, provider));
|
|
10192
10189
|
}
|
|
10193
10190
|
$registerInlineCompletionsSupport(handle, selector) {
|
|
10194
10191
|
const provider = {
|
|
@@ -10202,10 +10199,10 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10202
10199
|
this._proxy.$freeInlineCompletionsList(handle, completions.pid);
|
|
10203
10200
|
}
|
|
10204
10201
|
};
|
|
10205
|
-
this._registrations.set(handle,
|
|
10202
|
+
this._registrations.set(handle, this._languageFeaturesService.inlineCompletionsProvider.register(selector, provider));
|
|
10206
10203
|
}
|
|
10207
10204
|
$registerSignatureHelpProvider(handle, selector, metadata) {
|
|
10208
|
-
this._registrations.set(handle,
|
|
10205
|
+
this._registrations.set(handle, this._languageFeaturesService.signatureHelpProvider.register(selector, {
|
|
10209
10206
|
signatureHelpTriggerCharacters: metadata.triggerCharacters,
|
|
10210
10207
|
signatureHelpRetriggerCharacters: metadata.retriggerCharacters,
|
|
10211
10208
|
provideSignatureHelp: async (model, position, token, context) => {
|
|
@@ -10265,7 +10262,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10265
10262
|
this._registrations.set(eventHandle, emitter);
|
|
10266
10263
|
provider.onDidChangeInlayHints = emitter.event;
|
|
10267
10264
|
}
|
|
10268
|
-
this._registrations.set(handle,
|
|
10265
|
+
this._registrations.set(handle, this._languageFeaturesService.inlayHintsProvider.register(selector, provider));
|
|
10269
10266
|
}
|
|
10270
10267
|
$emitInlayHintsEvent(eventHandle) {
|
|
10271
10268
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10302,11 +10299,11 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10302
10299
|
});
|
|
10303
10300
|
};
|
|
10304
10301
|
}
|
|
10305
|
-
this._registrations.set(handle,
|
|
10302
|
+
this._registrations.set(handle, this._languageFeaturesService.linkProvider.register(selector, provider));
|
|
10306
10303
|
}
|
|
10307
10304
|
$registerDocumentColorProvider(handle, selector) {
|
|
10308
10305
|
const proxy = this._proxy;
|
|
10309
|
-
this._registrations.set(handle,
|
|
10306
|
+
this._registrations.set(handle, this._languageFeaturesService.colorProvider.register(selector, {
|
|
10310
10307
|
provideDocumentColors: (model, token) => {
|
|
10311
10308
|
return proxy.$provideDocumentColors(handle, model.uri, token)
|
|
10312
10309
|
.then(documentColors => {
|
|
@@ -10344,7 +10341,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10344
10341
|
this._registrations.set(eventHandle, emitter);
|
|
10345
10342
|
provider.onDidChange = emitter.event;
|
|
10346
10343
|
}
|
|
10347
|
-
this._registrations.set(handle,
|
|
10344
|
+
this._registrations.set(handle, this._languageFeaturesService.foldingRangeProvider.register(selector, provider));
|
|
10348
10345
|
}
|
|
10349
10346
|
$emitFoldingRangeEvent(eventHandle, event) {
|
|
10350
10347
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10353,14 +10350,14 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10353
10350
|
}
|
|
10354
10351
|
}
|
|
10355
10352
|
$registerSelectionRangeProvider(handle, selector) {
|
|
10356
|
-
this._registrations.set(handle,
|
|
10353
|
+
this._registrations.set(handle, this._languageFeaturesService.selectionRangeProvider.register(selector, {
|
|
10357
10354
|
provideSelectionRanges: (model, positions, token) => {
|
|
10358
10355
|
return this._proxy.$provideSelectionRanges(handle, model.uri, positions, token);
|
|
10359
10356
|
}
|
|
10360
10357
|
}));
|
|
10361
10358
|
}
|
|
10362
10359
|
$registerCallHierarchyProvider(handle, selector) {
|
|
10363
|
-
this._registrations.set(handle,
|
|
10360
|
+
this._registrations.set(handle, CallHierarchyProviderRegistry.register(selector, {
|
|
10364
10361
|
prepareCallHierarchy: async (document, position, token) => {
|
|
10365
10362
|
const items = await this._proxy.$prepareCallHierarchy(handle, document.uri, position, token);
|
|
10366
10363
|
if (!items || items.length === 0) {
|
|
@@ -10444,11 +10441,11 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10444
10441
|
};
|
|
10445
10442
|
}
|
|
10446
10443
|
if (this._languageService.isRegisteredLanguageId(languageId)) {
|
|
10447
|
-
this._registrations.set(handle,
|
|
10444
|
+
this._registrations.set(handle, this._languageConfigurationService.register(languageId, configuration, 100));
|
|
10448
10445
|
}
|
|
10449
10446
|
}
|
|
10450
10447
|
$registerTypeHierarchyProvider(handle, selector) {
|
|
10451
|
-
this._registrations.set(handle,
|
|
10448
|
+
this._registrations.set(handle, TypeHierarchyProviderRegistry.register(selector, {
|
|
10452
10449
|
prepareTypeHierarchy: async (document, position, token) => {
|
|
10453
10450
|
const items = await this._proxy.$prepareTypeHierarchy(handle, document.uri, position, token);
|
|
10454
10451
|
if (!items) {
|
|
@@ -10480,7 +10477,7 @@ define(['exports', 'monaco-editor/esm/vs/base/common/errors.js', 'monaco-editor/
|
|
|
10480
10477
|
}));
|
|
10481
10478
|
}
|
|
10482
10479
|
$registerDocumentOnDropProvider(handle, selector) {
|
|
10483
|
-
this._registrations.set(handle,
|
|
10480
|
+
this._registrations.set(handle, this._languageFeaturesService.documentOnDropEditProvider.register(selector, {
|
|
10484
10481
|
provideDocumentOnDropEdits: async (model, position, dataTransfer, token) => {
|
|
10485
10482
|
const dataTransferDto = await DataTransferConverter.toDataTransferDTO(dataTransfer);
|
|
10486
10483
|
return this._proxy.$provideDocumentOnDropEdits(handle, model.uri, position, dataTransferDto, token);
|
package/dist/api.cjs
CHANGED
|
@@ -11,7 +11,7 @@ var strings_js = require('monaco-editor/esm/vs/base/common/strings.js');
|
|
|
11
11
|
var mime_js = require('monaco-editor/esm/vs/base/common/mime.js');
|
|
12
12
|
var types_js = require('monaco-editor/esm/vs/base/common/types.js');
|
|
13
13
|
var map_js = require('monaco-editor/esm/vs/base/common/map.js');
|
|
14
|
-
var monaco = require('monaco-editor
|
|
14
|
+
var monaco = require('monaco-editor');
|
|
15
15
|
var services = require('./services.cjs');
|
|
16
16
|
var event_js = require('monaco-editor/esm/vs/base/common/event.js');
|
|
17
17
|
var Severity = require('monaco-editor/esm/vs/base/common/severity.js');
|
|
@@ -4681,7 +4681,7 @@ let ExtHostCommands = class ExtHostCommands {
|
|
|
4681
4681
|
this._argumentProcessors.push(processor);
|
|
4682
4682
|
}
|
|
4683
4683
|
registerApiCommand(apiCommand) {
|
|
4684
|
-
const registration =
|
|
4684
|
+
const registration = this.registerCommand(false, apiCommand.id, async (...apiArgs) => {
|
|
4685
4685
|
const internalArgs = apiCommand.args.map((arg, i) => {
|
|
4686
4686
|
if (!arg.validate(apiArgs[i])) {
|
|
4687
4687
|
throw new Error(`Invalid argument '${arg.name}' when running '${apiCommand.id}', received: ${apiArgs[i]}`);
|
|
@@ -4863,6 +4863,7 @@ class CommandsConverter {
|
|
|
4863
4863
|
this.delegatingCommandId = `_vscode_delegate_cmd_${Date.now().toString(36)}`;
|
|
4864
4864
|
this._cache = /*#__PURE__*/ new Map();
|
|
4865
4865
|
this._cachIdPool = 0;
|
|
4866
|
+
this._commands.registerCommand(true, this.delegatingCommandId, this._executeConvertedCommand, this);
|
|
4866
4867
|
}
|
|
4867
4868
|
toInternal(command, disposables) {
|
|
4868
4869
|
if (!command) {
|
|
@@ -7519,11 +7520,7 @@ class MonacoExtHostDocuments {
|
|
|
7519
7520
|
return data.document;
|
|
7520
7521
|
}
|
|
7521
7522
|
getDocumentData(resource) {
|
|
7522
|
-
|
|
7523
|
-
if (model == null) {
|
|
7524
|
-
throw new Error(`Unable to retrieve document from URI '${resource}'`);
|
|
7525
|
-
}
|
|
7526
|
-
return createDocumentDataFromModel(model);
|
|
7523
|
+
return this.documentsData.get(resource.toString());
|
|
7527
7524
|
}
|
|
7528
7525
|
get onDidAddDocument() { return this._onDidAddDocument.event; }
|
|
7529
7526
|
get onDidRemoveDocument() { return this._onDidRemoveDocument.event; }
|
|
@@ -9949,7 +9946,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
9949
9946
|
return data;
|
|
9950
9947
|
}
|
|
9951
9948
|
$registerDocumentSymbolProvider(handle, selector, displayName) {
|
|
9952
|
-
this._registrations.set(handle,
|
|
9949
|
+
this._registrations.set(handle, this._languageFeaturesService.documentSymbolProvider.register(selector, {
|
|
9953
9950
|
displayName,
|
|
9954
9951
|
provideDocumentSymbols: (model, token) => {
|
|
9955
9952
|
return this._proxy.$provideDocumentSymbols(handle, model.uri, token);
|
|
@@ -9977,7 +9974,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
9977
9974
|
this._registrations.set(eventHandle, emitter);
|
|
9978
9975
|
provider.onDidChange = emitter.event;
|
|
9979
9976
|
}
|
|
9980
|
-
this._registrations.set(handle,
|
|
9977
|
+
this._registrations.set(handle, this._languageFeaturesService.codeLensProvider.register(selector, provider));
|
|
9981
9978
|
}
|
|
9982
9979
|
$emitCodeLensEvent(eventHandle, event) {
|
|
9983
9980
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -9986,42 +9983,42 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
9986
9983
|
}
|
|
9987
9984
|
}
|
|
9988
9985
|
$registerDefinitionSupport(handle, selector) {
|
|
9989
|
-
this._registrations.set(handle,
|
|
9986
|
+
this._registrations.set(handle, this._languageFeaturesService.definitionProvider.register(selector, {
|
|
9990
9987
|
provideDefinition: (model, position, token) => {
|
|
9991
9988
|
return this._proxy.$provideDefinition(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
9992
9989
|
}
|
|
9993
9990
|
}));
|
|
9994
9991
|
}
|
|
9995
9992
|
$registerDeclarationSupport(handle, selector) {
|
|
9996
|
-
this._registrations.set(handle,
|
|
9993
|
+
this._registrations.set(handle, this._languageFeaturesService.declarationProvider.register(selector, {
|
|
9997
9994
|
provideDeclaration: (model, position, token) => {
|
|
9998
9995
|
return this._proxy.$provideDeclaration(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
9999
9996
|
}
|
|
10000
9997
|
}));
|
|
10001
9998
|
}
|
|
10002
9999
|
$registerImplementationSupport(handle, selector) {
|
|
10003
|
-
this._registrations.set(handle,
|
|
10000
|
+
this._registrations.set(handle, this._languageFeaturesService.implementationProvider.register(selector, {
|
|
10004
10001
|
provideImplementation: (model, position, token) => {
|
|
10005
10002
|
return this._proxy.$provideImplementation(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
10006
10003
|
}
|
|
10007
10004
|
}));
|
|
10008
10005
|
}
|
|
10009
10006
|
$registerTypeDefinitionSupport(handle, selector) {
|
|
10010
|
-
this._registrations.set(handle,
|
|
10007
|
+
this._registrations.set(handle, this._languageFeaturesService.typeDefinitionProvider.register(selector, {
|
|
10011
10008
|
provideTypeDefinition: (model, position, token) => {
|
|
10012
10009
|
return this._proxy.$provideTypeDefinition(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
10013
10010
|
}
|
|
10014
10011
|
}));
|
|
10015
10012
|
}
|
|
10016
10013
|
$registerHoverProvider(handle, selector) {
|
|
10017
|
-
this._registrations.set(handle,
|
|
10014
|
+
this._registrations.set(handle, this._languageFeaturesService.hoverProvider.register(selector, {
|
|
10018
10015
|
provideHover: (model, position, token) => {
|
|
10019
10016
|
return this._proxy.$provideHover(handle, model.uri, position, token);
|
|
10020
10017
|
}
|
|
10021
10018
|
}));
|
|
10022
10019
|
}
|
|
10023
10020
|
$registerEvaluatableExpressionProvider(handle, selector) {
|
|
10024
|
-
this._registrations.set(handle,
|
|
10021
|
+
this._registrations.set(handle, this._languageFeaturesService.evaluatableExpressionProvider.register(selector, {
|
|
10025
10022
|
provideEvaluatableExpression: (model, position, token) => {
|
|
10026
10023
|
return this._proxy.$provideEvaluatableExpression(handle, model.uri, position, token);
|
|
10027
10024
|
}
|
|
@@ -10038,7 +10035,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10038
10035
|
this._registrations.set(eventHandle, emitter);
|
|
10039
10036
|
provider.onDidChangeInlineValues = emitter.event;
|
|
10040
10037
|
}
|
|
10041
|
-
this._registrations.set(handle,
|
|
10038
|
+
this._registrations.set(handle, this._languageFeaturesService.inlineValuesProvider.register(selector, provider));
|
|
10042
10039
|
}
|
|
10043
10040
|
$emitInlineValuesEvent(eventHandle, event) {
|
|
10044
10041
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10047,14 +10044,14 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10047
10044
|
}
|
|
10048
10045
|
}
|
|
10049
10046
|
$registerDocumentHighlightProvider(handle, selector) {
|
|
10050
|
-
this._registrations.set(handle,
|
|
10047
|
+
this._registrations.set(handle, this._languageFeaturesService.documentHighlightProvider.register(selector, {
|
|
10051
10048
|
provideDocumentHighlights: (model, position, token) => {
|
|
10052
10049
|
return this._proxy.$provideDocumentHighlights(handle, model.uri, position, token);
|
|
10053
10050
|
}
|
|
10054
10051
|
}));
|
|
10055
10052
|
}
|
|
10056
10053
|
$registerLinkedEditingRangeProvider(handle, selector) {
|
|
10057
|
-
this._registrations.set(handle,
|
|
10054
|
+
this._registrations.set(handle, this._languageFeaturesService.linkedEditingRangeProvider.register(selector, {
|
|
10058
10055
|
provideLinkedEditingRanges: async (model, position, token) => {
|
|
10059
10056
|
const res = await this._proxy.$provideLinkedEditingRanges(handle, model.uri, position, token);
|
|
10060
10057
|
if (res) {
|
|
@@ -10068,7 +10065,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10068
10065
|
}));
|
|
10069
10066
|
}
|
|
10070
10067
|
$registerReferenceSupport(handle, selector) {
|
|
10071
|
-
this._registrations.set(handle,
|
|
10068
|
+
this._registrations.set(handle, this._languageFeaturesService.referenceProvider.register(selector, {
|
|
10072
10069
|
provideReferences: (model, position, context, token) => {
|
|
10073
10070
|
return this._proxy.$provideReferences(handle, model.uri, position, context, token).then(MainThreadLanguageFeatures_1._reviveLocationDto);
|
|
10074
10071
|
}
|
|
@@ -10101,10 +10098,10 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10101
10098
|
return codeAction;
|
|
10102
10099
|
};
|
|
10103
10100
|
}
|
|
10104
|
-
this._registrations.set(handle,
|
|
10101
|
+
this._registrations.set(handle, this._languageFeaturesService.codeActionProvider.register(selector, provider));
|
|
10105
10102
|
}
|
|
10106
10103
|
$registerDocumentFormattingSupport(handle, selector, extensionId, displayName) {
|
|
10107
|
-
this._registrations.set(handle,
|
|
10104
|
+
this._registrations.set(handle, this._languageFeaturesService.documentFormattingEditProvider.register(selector, {
|
|
10108
10105
|
extensionId,
|
|
10109
10106
|
displayName,
|
|
10110
10107
|
provideDocumentFormattingEdits: (model, options, token) => {
|
|
@@ -10113,7 +10110,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10113
10110
|
}));
|
|
10114
10111
|
}
|
|
10115
10112
|
$registerRangeFormattingSupport(handle, selector, extensionId, displayName) {
|
|
10116
|
-
this._registrations.set(handle,
|
|
10113
|
+
this._registrations.set(handle, this._languageFeaturesService.documentRangeFormattingEditProvider.register(selector, {
|
|
10117
10114
|
extensionId,
|
|
10118
10115
|
displayName,
|
|
10119
10116
|
provideDocumentRangeFormattingEdits: (model, range, options, token) => {
|
|
@@ -10122,7 +10119,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10122
10119
|
}));
|
|
10123
10120
|
}
|
|
10124
10121
|
$registerOnTypeFormattingSupport(handle, selector, autoFormatTriggerCharacters, extensionId) {
|
|
10125
|
-
this._registrations.set(handle,
|
|
10122
|
+
this._registrations.set(handle, this._languageFeaturesService.onTypeFormattingEditProvider.register(selector, {
|
|
10126
10123
|
extensionId,
|
|
10127
10124
|
autoFormatTriggerCharacters,
|
|
10128
10125
|
provideOnTypeFormattingEdits: (model, position, ch, options, token) => {
|
|
@@ -10148,10 +10145,10 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10148
10145
|
return resolvedItem && MainThreadLanguageFeatures_1._reviveWorkspaceSymbolDto(resolvedItem);
|
|
10149
10146
|
};
|
|
10150
10147
|
}
|
|
10151
|
-
this._registrations.set(handle,
|
|
10148
|
+
this._registrations.set(handle, WorkspaceSymbolProviderRegistry.register(provider));
|
|
10152
10149
|
}
|
|
10153
10150
|
$registerRenameSupport(handle, selector, supportResolveLocation) {
|
|
10154
|
-
this._registrations.set(handle,
|
|
10151
|
+
this._registrations.set(handle, this._languageFeaturesService.renameProvider.register(selector, {
|
|
10155
10152
|
provideRenameEdits: (model, position, newName, token) => {
|
|
10156
10153
|
return this._proxy.$provideRenameEdits(handle, model.uri, position, newName, token).then(reviveWorkspaceEditDto);
|
|
10157
10154
|
},
|
|
@@ -10167,7 +10164,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10167
10164
|
this._registrations.set(eventHandle, emitter);
|
|
10168
10165
|
event = emitter.event;
|
|
10169
10166
|
}
|
|
10170
|
-
this._registrations.set(handle,
|
|
10167
|
+
this._registrations.set(handle, this._languageFeaturesService.documentSemanticTokensProvider.register(selector, /*#__PURE__*/ new MainThreadDocumentSemanticTokensProvider(this._proxy, handle, legend, event)));
|
|
10171
10168
|
}
|
|
10172
10169
|
$emitDocumentSemanticTokensEvent(eventHandle) {
|
|
10173
10170
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10176,7 +10173,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10176
10173
|
}
|
|
10177
10174
|
}
|
|
10178
10175
|
$registerDocumentRangeSemanticTokensProvider(handle, selector, legend) {
|
|
10179
|
-
this._registrations.set(handle,
|
|
10176
|
+
this._registrations.set(handle, this._languageFeaturesService.documentRangeSemanticTokensProvider.register(selector, /*#__PURE__*/ new MainThreadDocumentRangeSemanticTokensProvider(this._proxy, handle, legend)));
|
|
10180
10177
|
}
|
|
10181
10178
|
static _inflateSuggestDto(defaultRange, data) {
|
|
10182
10179
|
const label = data["a" ];
|
|
@@ -10230,7 +10227,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10230
10227
|
});
|
|
10231
10228
|
};
|
|
10232
10229
|
}
|
|
10233
|
-
this._registrations.set(handle,
|
|
10230
|
+
this._registrations.set(handle, this._languageFeaturesService.completionProvider.register(selector, provider));
|
|
10234
10231
|
}
|
|
10235
10232
|
$registerInlineCompletionsSupport(handle, selector) {
|
|
10236
10233
|
const provider = {
|
|
@@ -10244,10 +10241,10 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10244
10241
|
this._proxy.$freeInlineCompletionsList(handle, completions.pid);
|
|
10245
10242
|
}
|
|
10246
10243
|
};
|
|
10247
|
-
this._registrations.set(handle,
|
|
10244
|
+
this._registrations.set(handle, this._languageFeaturesService.inlineCompletionsProvider.register(selector, provider));
|
|
10248
10245
|
}
|
|
10249
10246
|
$registerSignatureHelpProvider(handle, selector, metadata) {
|
|
10250
|
-
this._registrations.set(handle,
|
|
10247
|
+
this._registrations.set(handle, this._languageFeaturesService.signatureHelpProvider.register(selector, {
|
|
10251
10248
|
signatureHelpTriggerCharacters: metadata.triggerCharacters,
|
|
10252
10249
|
signatureHelpRetriggerCharacters: metadata.retriggerCharacters,
|
|
10253
10250
|
provideSignatureHelp: async (model, position, token, context) => {
|
|
@@ -10307,7 +10304,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10307
10304
|
this._registrations.set(eventHandle, emitter);
|
|
10308
10305
|
provider.onDidChangeInlayHints = emitter.event;
|
|
10309
10306
|
}
|
|
10310
|
-
this._registrations.set(handle,
|
|
10307
|
+
this._registrations.set(handle, this._languageFeaturesService.inlayHintsProvider.register(selector, provider));
|
|
10311
10308
|
}
|
|
10312
10309
|
$emitInlayHintsEvent(eventHandle) {
|
|
10313
10310
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10344,11 +10341,11 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10344
10341
|
});
|
|
10345
10342
|
};
|
|
10346
10343
|
}
|
|
10347
|
-
this._registrations.set(handle,
|
|
10344
|
+
this._registrations.set(handle, this._languageFeaturesService.linkProvider.register(selector, provider));
|
|
10348
10345
|
}
|
|
10349
10346
|
$registerDocumentColorProvider(handle, selector) {
|
|
10350
10347
|
const proxy = this._proxy;
|
|
10351
|
-
this._registrations.set(handle,
|
|
10348
|
+
this._registrations.set(handle, this._languageFeaturesService.colorProvider.register(selector, {
|
|
10352
10349
|
provideDocumentColors: (model, token) => {
|
|
10353
10350
|
return proxy.$provideDocumentColors(handle, model.uri, token)
|
|
10354
10351
|
.then(documentColors => {
|
|
@@ -10386,7 +10383,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10386
10383
|
this._registrations.set(eventHandle, emitter);
|
|
10387
10384
|
provider.onDidChange = emitter.event;
|
|
10388
10385
|
}
|
|
10389
|
-
this._registrations.set(handle,
|
|
10386
|
+
this._registrations.set(handle, this._languageFeaturesService.foldingRangeProvider.register(selector, provider));
|
|
10390
10387
|
}
|
|
10391
10388
|
$emitFoldingRangeEvent(eventHandle, event) {
|
|
10392
10389
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10395,14 +10392,14 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10395
10392
|
}
|
|
10396
10393
|
}
|
|
10397
10394
|
$registerSelectionRangeProvider(handle, selector) {
|
|
10398
|
-
this._registrations.set(handle,
|
|
10395
|
+
this._registrations.set(handle, this._languageFeaturesService.selectionRangeProvider.register(selector, {
|
|
10399
10396
|
provideSelectionRanges: (model, positions, token) => {
|
|
10400
10397
|
return this._proxy.$provideSelectionRanges(handle, model.uri, positions, token);
|
|
10401
10398
|
}
|
|
10402
10399
|
}));
|
|
10403
10400
|
}
|
|
10404
10401
|
$registerCallHierarchyProvider(handle, selector) {
|
|
10405
|
-
this._registrations.set(handle,
|
|
10402
|
+
this._registrations.set(handle, CallHierarchyProviderRegistry.register(selector, {
|
|
10406
10403
|
prepareCallHierarchy: async (document, position, token) => {
|
|
10407
10404
|
const items = await this._proxy.$prepareCallHierarchy(handle, document.uri, position, token);
|
|
10408
10405
|
if (!items || items.length === 0) {
|
|
@@ -10486,11 +10483,11 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10486
10483
|
};
|
|
10487
10484
|
}
|
|
10488
10485
|
if (this._languageService.isRegisteredLanguageId(languageId)) {
|
|
10489
|
-
this._registrations.set(handle,
|
|
10486
|
+
this._registrations.set(handle, this._languageConfigurationService.register(languageId, configuration, 100));
|
|
10490
10487
|
}
|
|
10491
10488
|
}
|
|
10492
10489
|
$registerTypeHierarchyProvider(handle, selector) {
|
|
10493
|
-
this._registrations.set(handle,
|
|
10490
|
+
this._registrations.set(handle, TypeHierarchyProviderRegistry.register(selector, {
|
|
10494
10491
|
prepareTypeHierarchy: async (document, position, token) => {
|
|
10495
10492
|
const items = await this._proxy.$prepareTypeHierarchy(handle, document.uri, position, token);
|
|
10496
10493
|
if (!items) {
|
|
@@ -10522,7 +10519,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10522
10519
|
}));
|
|
10523
10520
|
}
|
|
10524
10521
|
$registerDocumentOnDropProvider(handle, selector) {
|
|
10525
|
-
this._registrations.set(handle,
|
|
10522
|
+
this._registrations.set(handle, this._languageFeaturesService.documentOnDropEditProvider.register(selector, {
|
|
10526
10523
|
provideDocumentOnDropEdits: async (model, position, dataTransfer, token) => {
|
|
10527
10524
|
const dataTransferDto = await DataTransferConverter.toDataTransferDTO(dataTransfer);
|
|
10528
10525
|
return this._proxy.$provideDocumentOnDropEdits(handle, model.uri, position, dataTransferDto, token);
|
package/dist/api.js
CHANGED
|
@@ -7,7 +7,7 @@ import { nextCharLength, regExpLeadsToEndlessLoop, regExpFlags } from 'monaco-ed
|
|
|
7
7
|
import { Mimes } from 'monaco-editor/esm/vs/base/common/mime.js';
|
|
8
8
|
import { isArray, isString as isString$1, isNumber, validateConstraint, isObject } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
9
9
|
import { ResourceMap as ResourceMap$1 } from 'monaco-editor/esm/vs/base/common/map.js';
|
|
10
|
-
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
10
|
+
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
11
11
|
import { Services } from './services.js';
|
|
12
12
|
import { Event, DebounceEmitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
13
13
|
import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
@@ -4654,7 +4654,7 @@ let ExtHostCommands = class ExtHostCommands {
|
|
|
4654
4654
|
this._argumentProcessors.push(processor);
|
|
4655
4655
|
}
|
|
4656
4656
|
registerApiCommand(apiCommand) {
|
|
4657
|
-
const registration =
|
|
4657
|
+
const registration = this.registerCommand(false, apiCommand.id, async (...apiArgs) => {
|
|
4658
4658
|
const internalArgs = apiCommand.args.map((arg, i) => {
|
|
4659
4659
|
if (!arg.validate(apiArgs[i])) {
|
|
4660
4660
|
throw new Error(`Invalid argument '${arg.name}' when running '${apiCommand.id}', received: ${apiArgs[i]}`);
|
|
@@ -4836,6 +4836,7 @@ class CommandsConverter {
|
|
|
4836
4836
|
this.delegatingCommandId = `_vscode_delegate_cmd_${Date.now().toString(36)}`;
|
|
4837
4837
|
this._cache = /*#__PURE__*/ new Map();
|
|
4838
4838
|
this._cachIdPool = 0;
|
|
4839
|
+
this._commands.registerCommand(true, this.delegatingCommandId, this._executeConvertedCommand, this);
|
|
4839
4840
|
}
|
|
4840
4841
|
toInternal(command, disposables) {
|
|
4841
4842
|
if (!command) {
|
|
@@ -7492,11 +7493,7 @@ class MonacoExtHostDocuments {
|
|
|
7492
7493
|
return data.document;
|
|
7493
7494
|
}
|
|
7494
7495
|
getDocumentData(resource) {
|
|
7495
|
-
|
|
7496
|
-
if (model == null) {
|
|
7497
|
-
throw new Error(`Unable to retrieve document from URI '${resource}'`);
|
|
7498
|
-
}
|
|
7499
|
-
return createDocumentDataFromModel(model);
|
|
7496
|
+
return this.documentsData.get(resource.toString());
|
|
7500
7497
|
}
|
|
7501
7498
|
get onDidAddDocument() { return this._onDidAddDocument.event; }
|
|
7502
7499
|
get onDidRemoveDocument() { return this._onDidRemoveDocument.event; }
|
|
@@ -9922,7 +9919,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
9922
9919
|
return data;
|
|
9923
9920
|
}
|
|
9924
9921
|
$registerDocumentSymbolProvider(handle, selector, displayName) {
|
|
9925
|
-
this._registrations.set(handle,
|
|
9922
|
+
this._registrations.set(handle, this._languageFeaturesService.documentSymbolProvider.register(selector, {
|
|
9926
9923
|
displayName,
|
|
9927
9924
|
provideDocumentSymbols: (model, token) => {
|
|
9928
9925
|
return this._proxy.$provideDocumentSymbols(handle, model.uri, token);
|
|
@@ -9950,7 +9947,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
9950
9947
|
this._registrations.set(eventHandle, emitter);
|
|
9951
9948
|
provider.onDidChange = emitter.event;
|
|
9952
9949
|
}
|
|
9953
|
-
this._registrations.set(handle,
|
|
9950
|
+
this._registrations.set(handle, this._languageFeaturesService.codeLensProvider.register(selector, provider));
|
|
9954
9951
|
}
|
|
9955
9952
|
$emitCodeLensEvent(eventHandle, event) {
|
|
9956
9953
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -9959,42 +9956,42 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
9959
9956
|
}
|
|
9960
9957
|
}
|
|
9961
9958
|
$registerDefinitionSupport(handle, selector) {
|
|
9962
|
-
this._registrations.set(handle,
|
|
9959
|
+
this._registrations.set(handle, this._languageFeaturesService.definitionProvider.register(selector, {
|
|
9963
9960
|
provideDefinition: (model, position, token) => {
|
|
9964
9961
|
return this._proxy.$provideDefinition(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
9965
9962
|
}
|
|
9966
9963
|
}));
|
|
9967
9964
|
}
|
|
9968
9965
|
$registerDeclarationSupport(handle, selector) {
|
|
9969
|
-
this._registrations.set(handle,
|
|
9966
|
+
this._registrations.set(handle, this._languageFeaturesService.declarationProvider.register(selector, {
|
|
9970
9967
|
provideDeclaration: (model, position, token) => {
|
|
9971
9968
|
return this._proxy.$provideDeclaration(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
9972
9969
|
}
|
|
9973
9970
|
}));
|
|
9974
9971
|
}
|
|
9975
9972
|
$registerImplementationSupport(handle, selector) {
|
|
9976
|
-
this._registrations.set(handle,
|
|
9973
|
+
this._registrations.set(handle, this._languageFeaturesService.implementationProvider.register(selector, {
|
|
9977
9974
|
provideImplementation: (model, position, token) => {
|
|
9978
9975
|
return this._proxy.$provideImplementation(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
9979
9976
|
}
|
|
9980
9977
|
}));
|
|
9981
9978
|
}
|
|
9982
9979
|
$registerTypeDefinitionSupport(handle, selector) {
|
|
9983
|
-
this._registrations.set(handle,
|
|
9980
|
+
this._registrations.set(handle, this._languageFeaturesService.typeDefinitionProvider.register(selector, {
|
|
9984
9981
|
provideTypeDefinition: (model, position, token) => {
|
|
9985
9982
|
return this._proxy.$provideTypeDefinition(handle, model.uri, position, token).then(MainThreadLanguageFeatures_1._reviveLocationLinkDto);
|
|
9986
9983
|
}
|
|
9987
9984
|
}));
|
|
9988
9985
|
}
|
|
9989
9986
|
$registerHoverProvider(handle, selector) {
|
|
9990
|
-
this._registrations.set(handle,
|
|
9987
|
+
this._registrations.set(handle, this._languageFeaturesService.hoverProvider.register(selector, {
|
|
9991
9988
|
provideHover: (model, position, token) => {
|
|
9992
9989
|
return this._proxy.$provideHover(handle, model.uri, position, token);
|
|
9993
9990
|
}
|
|
9994
9991
|
}));
|
|
9995
9992
|
}
|
|
9996
9993
|
$registerEvaluatableExpressionProvider(handle, selector) {
|
|
9997
|
-
this._registrations.set(handle,
|
|
9994
|
+
this._registrations.set(handle, this._languageFeaturesService.evaluatableExpressionProvider.register(selector, {
|
|
9998
9995
|
provideEvaluatableExpression: (model, position, token) => {
|
|
9999
9996
|
return this._proxy.$provideEvaluatableExpression(handle, model.uri, position, token);
|
|
10000
9997
|
}
|
|
@@ -10011,7 +10008,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10011
10008
|
this._registrations.set(eventHandle, emitter);
|
|
10012
10009
|
provider.onDidChangeInlineValues = emitter.event;
|
|
10013
10010
|
}
|
|
10014
|
-
this._registrations.set(handle,
|
|
10011
|
+
this._registrations.set(handle, this._languageFeaturesService.inlineValuesProvider.register(selector, provider));
|
|
10015
10012
|
}
|
|
10016
10013
|
$emitInlineValuesEvent(eventHandle, event) {
|
|
10017
10014
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10020,14 +10017,14 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10020
10017
|
}
|
|
10021
10018
|
}
|
|
10022
10019
|
$registerDocumentHighlightProvider(handle, selector) {
|
|
10023
|
-
this._registrations.set(handle,
|
|
10020
|
+
this._registrations.set(handle, this._languageFeaturesService.documentHighlightProvider.register(selector, {
|
|
10024
10021
|
provideDocumentHighlights: (model, position, token) => {
|
|
10025
10022
|
return this._proxy.$provideDocumentHighlights(handle, model.uri, position, token);
|
|
10026
10023
|
}
|
|
10027
10024
|
}));
|
|
10028
10025
|
}
|
|
10029
10026
|
$registerLinkedEditingRangeProvider(handle, selector) {
|
|
10030
|
-
this._registrations.set(handle,
|
|
10027
|
+
this._registrations.set(handle, this._languageFeaturesService.linkedEditingRangeProvider.register(selector, {
|
|
10031
10028
|
provideLinkedEditingRanges: async (model, position, token) => {
|
|
10032
10029
|
const res = await this._proxy.$provideLinkedEditingRanges(handle, model.uri, position, token);
|
|
10033
10030
|
if (res) {
|
|
@@ -10041,7 +10038,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10041
10038
|
}));
|
|
10042
10039
|
}
|
|
10043
10040
|
$registerReferenceSupport(handle, selector) {
|
|
10044
|
-
this._registrations.set(handle,
|
|
10041
|
+
this._registrations.set(handle, this._languageFeaturesService.referenceProvider.register(selector, {
|
|
10045
10042
|
provideReferences: (model, position, context, token) => {
|
|
10046
10043
|
return this._proxy.$provideReferences(handle, model.uri, position, context, token).then(MainThreadLanguageFeatures_1._reviveLocationDto);
|
|
10047
10044
|
}
|
|
@@ -10074,10 +10071,10 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10074
10071
|
return codeAction;
|
|
10075
10072
|
};
|
|
10076
10073
|
}
|
|
10077
|
-
this._registrations.set(handle,
|
|
10074
|
+
this._registrations.set(handle, this._languageFeaturesService.codeActionProvider.register(selector, provider));
|
|
10078
10075
|
}
|
|
10079
10076
|
$registerDocumentFormattingSupport(handle, selector, extensionId, displayName) {
|
|
10080
|
-
this._registrations.set(handle,
|
|
10077
|
+
this._registrations.set(handle, this._languageFeaturesService.documentFormattingEditProvider.register(selector, {
|
|
10081
10078
|
extensionId,
|
|
10082
10079
|
displayName,
|
|
10083
10080
|
provideDocumentFormattingEdits: (model, options, token) => {
|
|
@@ -10086,7 +10083,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10086
10083
|
}));
|
|
10087
10084
|
}
|
|
10088
10085
|
$registerRangeFormattingSupport(handle, selector, extensionId, displayName) {
|
|
10089
|
-
this._registrations.set(handle,
|
|
10086
|
+
this._registrations.set(handle, this._languageFeaturesService.documentRangeFormattingEditProvider.register(selector, {
|
|
10090
10087
|
extensionId,
|
|
10091
10088
|
displayName,
|
|
10092
10089
|
provideDocumentRangeFormattingEdits: (model, range, options, token) => {
|
|
@@ -10095,7 +10092,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10095
10092
|
}));
|
|
10096
10093
|
}
|
|
10097
10094
|
$registerOnTypeFormattingSupport(handle, selector, autoFormatTriggerCharacters, extensionId) {
|
|
10098
|
-
this._registrations.set(handle,
|
|
10095
|
+
this._registrations.set(handle, this._languageFeaturesService.onTypeFormattingEditProvider.register(selector, {
|
|
10099
10096
|
extensionId,
|
|
10100
10097
|
autoFormatTriggerCharacters,
|
|
10101
10098
|
provideOnTypeFormattingEdits: (model, position, ch, options, token) => {
|
|
@@ -10121,10 +10118,10 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10121
10118
|
return resolvedItem && MainThreadLanguageFeatures_1._reviveWorkspaceSymbolDto(resolvedItem);
|
|
10122
10119
|
};
|
|
10123
10120
|
}
|
|
10124
|
-
this._registrations.set(handle,
|
|
10121
|
+
this._registrations.set(handle, WorkspaceSymbolProviderRegistry.register(provider));
|
|
10125
10122
|
}
|
|
10126
10123
|
$registerRenameSupport(handle, selector, supportResolveLocation) {
|
|
10127
|
-
this._registrations.set(handle,
|
|
10124
|
+
this._registrations.set(handle, this._languageFeaturesService.renameProvider.register(selector, {
|
|
10128
10125
|
provideRenameEdits: (model, position, newName, token) => {
|
|
10129
10126
|
return this._proxy.$provideRenameEdits(handle, model.uri, position, newName, token).then(reviveWorkspaceEditDto);
|
|
10130
10127
|
},
|
|
@@ -10140,7 +10137,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10140
10137
|
this._registrations.set(eventHandle, emitter);
|
|
10141
10138
|
event = emitter.event;
|
|
10142
10139
|
}
|
|
10143
|
-
this._registrations.set(handle,
|
|
10140
|
+
this._registrations.set(handle, this._languageFeaturesService.documentSemanticTokensProvider.register(selector, /*#__PURE__*/ new MainThreadDocumentSemanticTokensProvider(this._proxy, handle, legend, event)));
|
|
10144
10141
|
}
|
|
10145
10142
|
$emitDocumentSemanticTokensEvent(eventHandle) {
|
|
10146
10143
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10149,7 +10146,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10149
10146
|
}
|
|
10150
10147
|
}
|
|
10151
10148
|
$registerDocumentRangeSemanticTokensProvider(handle, selector, legend) {
|
|
10152
|
-
this._registrations.set(handle,
|
|
10149
|
+
this._registrations.set(handle, this._languageFeaturesService.documentRangeSemanticTokensProvider.register(selector, /*#__PURE__*/ new MainThreadDocumentRangeSemanticTokensProvider(this._proxy, handle, legend)));
|
|
10153
10150
|
}
|
|
10154
10151
|
static _inflateSuggestDto(defaultRange, data) {
|
|
10155
10152
|
const label = data["a" ];
|
|
@@ -10203,7 +10200,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10203
10200
|
});
|
|
10204
10201
|
};
|
|
10205
10202
|
}
|
|
10206
|
-
this._registrations.set(handle,
|
|
10203
|
+
this._registrations.set(handle, this._languageFeaturesService.completionProvider.register(selector, provider));
|
|
10207
10204
|
}
|
|
10208
10205
|
$registerInlineCompletionsSupport(handle, selector) {
|
|
10209
10206
|
const provider = {
|
|
@@ -10217,10 +10214,10 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10217
10214
|
this._proxy.$freeInlineCompletionsList(handle, completions.pid);
|
|
10218
10215
|
}
|
|
10219
10216
|
};
|
|
10220
|
-
this._registrations.set(handle,
|
|
10217
|
+
this._registrations.set(handle, this._languageFeaturesService.inlineCompletionsProvider.register(selector, provider));
|
|
10221
10218
|
}
|
|
10222
10219
|
$registerSignatureHelpProvider(handle, selector, metadata) {
|
|
10223
|
-
this._registrations.set(handle,
|
|
10220
|
+
this._registrations.set(handle, this._languageFeaturesService.signatureHelpProvider.register(selector, {
|
|
10224
10221
|
signatureHelpTriggerCharacters: metadata.triggerCharacters,
|
|
10225
10222
|
signatureHelpRetriggerCharacters: metadata.retriggerCharacters,
|
|
10226
10223
|
provideSignatureHelp: async (model, position, token, context) => {
|
|
@@ -10280,7 +10277,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10280
10277
|
this._registrations.set(eventHandle, emitter);
|
|
10281
10278
|
provider.onDidChangeInlayHints = emitter.event;
|
|
10282
10279
|
}
|
|
10283
|
-
this._registrations.set(handle,
|
|
10280
|
+
this._registrations.set(handle, this._languageFeaturesService.inlayHintsProvider.register(selector, provider));
|
|
10284
10281
|
}
|
|
10285
10282
|
$emitInlayHintsEvent(eventHandle) {
|
|
10286
10283
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10317,11 +10314,11 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10317
10314
|
});
|
|
10318
10315
|
};
|
|
10319
10316
|
}
|
|
10320
|
-
this._registrations.set(handle,
|
|
10317
|
+
this._registrations.set(handle, this._languageFeaturesService.linkProvider.register(selector, provider));
|
|
10321
10318
|
}
|
|
10322
10319
|
$registerDocumentColorProvider(handle, selector) {
|
|
10323
10320
|
const proxy = this._proxy;
|
|
10324
|
-
this._registrations.set(handle,
|
|
10321
|
+
this._registrations.set(handle, this._languageFeaturesService.colorProvider.register(selector, {
|
|
10325
10322
|
provideDocumentColors: (model, token) => {
|
|
10326
10323
|
return proxy.$provideDocumentColors(handle, model.uri, token)
|
|
10327
10324
|
.then(documentColors => {
|
|
@@ -10359,7 +10356,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10359
10356
|
this._registrations.set(eventHandle, emitter);
|
|
10360
10357
|
provider.onDidChange = emitter.event;
|
|
10361
10358
|
}
|
|
10362
|
-
this._registrations.set(handle,
|
|
10359
|
+
this._registrations.set(handle, this._languageFeaturesService.foldingRangeProvider.register(selector, provider));
|
|
10363
10360
|
}
|
|
10364
10361
|
$emitFoldingRangeEvent(eventHandle, event) {
|
|
10365
10362
|
const obj = this._registrations.get(eventHandle);
|
|
@@ -10368,14 +10365,14 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10368
10365
|
}
|
|
10369
10366
|
}
|
|
10370
10367
|
$registerSelectionRangeProvider(handle, selector) {
|
|
10371
|
-
this._registrations.set(handle,
|
|
10368
|
+
this._registrations.set(handle, this._languageFeaturesService.selectionRangeProvider.register(selector, {
|
|
10372
10369
|
provideSelectionRanges: (model, positions, token) => {
|
|
10373
10370
|
return this._proxy.$provideSelectionRanges(handle, model.uri, positions, token);
|
|
10374
10371
|
}
|
|
10375
10372
|
}));
|
|
10376
10373
|
}
|
|
10377
10374
|
$registerCallHierarchyProvider(handle, selector) {
|
|
10378
|
-
this._registrations.set(handle,
|
|
10375
|
+
this._registrations.set(handle, CallHierarchyProviderRegistry.register(selector, {
|
|
10379
10376
|
prepareCallHierarchy: async (document, position, token) => {
|
|
10380
10377
|
const items = await this._proxy.$prepareCallHierarchy(handle, document.uri, position, token);
|
|
10381
10378
|
if (!items || items.length === 0) {
|
|
@@ -10459,11 +10456,11 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10459
10456
|
};
|
|
10460
10457
|
}
|
|
10461
10458
|
if (this._languageService.isRegisteredLanguageId(languageId)) {
|
|
10462
|
-
this._registrations.set(handle,
|
|
10459
|
+
this._registrations.set(handle, this._languageConfigurationService.register(languageId, configuration, 100));
|
|
10463
10460
|
}
|
|
10464
10461
|
}
|
|
10465
10462
|
$registerTypeHierarchyProvider(handle, selector) {
|
|
10466
|
-
this._registrations.set(handle,
|
|
10463
|
+
this._registrations.set(handle, TypeHierarchyProviderRegistry.register(selector, {
|
|
10467
10464
|
prepareTypeHierarchy: async (document, position, token) => {
|
|
10468
10465
|
const items = await this._proxy.$prepareTypeHierarchy(handle, document.uri, position, token);
|
|
10469
10466
|
if (!items) {
|
|
@@ -10495,7 +10492,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
10495
10492
|
}));
|
|
10496
10493
|
}
|
|
10497
10494
|
$registerDocumentOnDropProvider(handle, selector) {
|
|
10498
|
-
this._registrations.set(handle,
|
|
10495
|
+
this._registrations.set(handle, this._languageFeaturesService.documentOnDropEditProvider.register(selector, {
|
|
10499
10496
|
provideDocumentOnDropEdits: async (model, position, dataTransfer, token) => {
|
|
10500
10497
|
const dataTransferDto = await DataTransferConverter.toDataTransferDTO(dataTransfer);
|
|
10501
10498
|
return this._proxy.$provideDocumentOnDropEdits(handle, model.uri, position, dataTransferDto, token);
|