monaco-languageclient 6.3.0-next.1 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +0 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/monaco-language-client.d.ts +7 -15
- package/lib/monaco-language-client.d.ts.map +1 -1
- package/lib/monaco-language-client.js +1 -117
- package/lib/monaco-language-client.js.map +1 -1
- package/lib/monaco-vscode-api-services.d.ts +8 -6
- package/lib/monaco-vscode-api-services.d.ts.map +1 -1
- package/lib/monaco-vscode-api-services.js +24 -21
- package/lib/monaco-vscode-api-services.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/monaco-language-client.ts +9 -132
- package/src/monaco-vscode-api-services.ts +25 -28
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this npm module are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [6.3.0] - 2023-08-0x
|
|
6
|
+
|
|
7
|
+
- Update to `monaco-editor` `0.40.0` and `monaco-vscode-api` `1.80.2` [#513](https://github.com/TypeFox/monaco-languageclient/pull/513)
|
|
8
|
+
- vscode api services have been cleaned-up and fully aligned with `monaco-vscode-api
|
|
9
|
+
|
|
5
10
|
## [6.2.0] - 2023-06-16
|
|
6
11
|
|
|
7
12
|
- Updated `monaco-vscode-api` to version `1.79.3`, `monaco-editor` to version `0.39.0` and `monaco-editor-workers` to version `0.39.1` [#503](https://github.com/TypeFox/monaco-languageclient/pull/503)
|
package/README.md
CHANGED
|
@@ -12,7 +12,6 @@ See [here](https://github.com/TypeFox/monaco-languageclient/blob/main/README.md)
|
|
|
12
12
|
|
|
13
13
|
## History
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
For the history please see the [README](https://github.com/TypeFox/monaco-languageclient/blob/main/README.md#latest-important-project-changes) and [CHANGELOG](https://github.com/TypeFox/monaco-languageclient/blob/main/CHANGELOG.md).
|
|
17
16
|
|
|
18
17
|
## License
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AACpG,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC"}
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC"}
|
|
@@ -2,24 +2,16 @@ import { BaseLanguageClient, MessageTransports, LanguageClientOptions } from 'vs
|
|
|
2
2
|
export interface IConnectionProvider {
|
|
3
3
|
get(encoding: string): Promise<MessageTransports>;
|
|
4
4
|
}
|
|
5
|
+
export type MonacoLanguageClientOptions = {
|
|
6
|
+
name: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
clientOptions: LanguageClientOptions;
|
|
9
|
+
connectionProvider: IConnectionProvider;
|
|
10
|
+
};
|
|
5
11
|
export declare class MonacoLanguageClient extends BaseLanguageClient {
|
|
6
12
|
protected readonly connectionProvider: IConnectionProvider;
|
|
7
|
-
constructor({ id, name, clientOptions, connectionProvider }:
|
|
13
|
+
constructor({ id, name, clientOptions, connectionProvider }: MonacoLanguageClientOptions);
|
|
8
14
|
protected createMessageTransports(encoding: string): Promise<MessageTransports>;
|
|
9
15
|
protected getLocale(): string;
|
|
10
|
-
protected registerBuiltinFeatures(): void;
|
|
11
|
-
/**
|
|
12
|
-
* These are all contained in BaseLanguageClient#registerBuiltinFeatures but not registered
|
|
13
|
-
* in MonacoLanguageClient. This method is not called!
|
|
14
|
-
*/
|
|
15
|
-
registerNotUsedFeatures(): void;
|
|
16
|
-
}
|
|
17
|
-
export declare namespace MonacoLanguageClient {
|
|
18
|
-
interface Options {
|
|
19
|
-
name: string;
|
|
20
|
-
id?: string;
|
|
21
|
-
clientOptions: LanguageClientOptions;
|
|
22
|
-
connectionProvider: IConnectionProvider;
|
|
23
|
-
}
|
|
24
16
|
}
|
|
25
17
|
//# sourceMappingURL=monaco-language-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monaco-language-client.d.ts","sourceRoot":"","sources":["../src/monaco-language-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"monaco-language-client.d.ts","sourceRoot":"","sources":["../src/monaco-language-client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAE1H,MAAM,WAAW,mBAAmB;IAChC,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACrD;AAED,MAAM,MAAM,2BAA2B,GAAG;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,qBAAqB,CAAC;IACrC,kBAAkB,EAAE,mBAAmB,CAAC;CAC3C,CAAA;AAED,qBAAa,oBAAqB,SAAQ,kBAAkB;IACxD,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;gBAE/C,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,2BAA2B;IAKxF,SAAS,CAAC,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;cAI5D,SAAS,IAAI,MAAM;CAGzC"}
|
|
@@ -2,134 +2,18 @@
|
|
|
2
2
|
* Copyright (c) 2018-2022 TypeFox GmbH (http://www.typefox.io). All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
|
-
/* eslint-disable @typescript-eslint/dot-notation */
|
|
6
5
|
import { BaseLanguageClient } from 'vscode-languageclient/lib/common/client.js';
|
|
7
|
-
import { ConfigurationFeature, SyncConfigurationFeature } from 'vscode-languageclient/lib/common/configuration.js';
|
|
8
|
-
import { DidChangeTextDocumentFeature, DidCloseTextDocumentFeature, DidOpenTextDocumentFeature, DidSaveTextDocumentFeature, WillSaveFeature, WillSaveWaitUntilFeature } from 'vscode-languageclient/lib/common/textSynchronization.js';
|
|
9
|
-
import { CompletionItemFeature } from 'vscode-languageclient/lib/common/completion.js';
|
|
10
|
-
import { HoverFeature } from 'vscode-languageclient/lib/common/hover.js';
|
|
11
|
-
import { SignatureHelpFeature } from 'vscode-languageclient/lib/common/signatureHelp.js';
|
|
12
|
-
import { DefinitionFeature } from 'vscode-languageclient/lib/common/definition.js';
|
|
13
|
-
import { ReferencesFeature } from 'vscode-languageclient/lib/common/reference.js';
|
|
14
|
-
import { DocumentHighlightFeature } from 'vscode-languageclient/lib/common/documentHighlight.js';
|
|
15
|
-
import { DocumentSymbolFeature } from 'vscode-languageclient/lib/common/documentSymbol.js';
|
|
16
|
-
import { CodeActionFeature } from 'vscode-languageclient/lib/common/codeAction.js';
|
|
17
|
-
import { CodeLensFeature } from 'vscode-languageclient/lib/common/codeLens.js';
|
|
18
|
-
import { DocumentFormattingFeature, DocumentOnTypeFormattingFeature, DocumentRangeFormattingFeature } from 'vscode-languageclient/lib/common/formatting.js';
|
|
19
|
-
import { RenameFeature } from 'vscode-languageclient/lib/common/rename.js';
|
|
20
|
-
import { DocumentLinkFeature } from 'vscode-languageclient/lib/common/documentLink.js';
|
|
21
|
-
import { ExecuteCommandFeature } from 'vscode-languageclient/lib/common/executeCommand.js';
|
|
22
|
-
import { TypeDefinitionFeature } from 'vscode-languageclient/lib/common/typeDefinition.js';
|
|
23
|
-
import { ImplementationFeature } from 'vscode-languageclient/lib/common/implementation.js';
|
|
24
|
-
import { ColorProviderFeature } from 'vscode-languageclient/lib/common/colorProvider.js';
|
|
25
|
-
import { WorkspaceFoldersFeature } from 'vscode-languageclient/lib/common/workspaceFolder.js';
|
|
26
|
-
import { FoldingRangeFeature } from 'vscode-languageclient/lib/common/foldingRange.js';
|
|
27
|
-
import { DeclarationFeature } from 'vscode-languageclient/lib/common/declaration.js';
|
|
28
|
-
import { SelectionRangeFeature } from 'vscode-languageclient/lib/common/selectionRange.js';
|
|
29
|
-
import { SemanticTokensFeature } from 'vscode-languageclient/lib/common/semanticTokens.js';
|
|
30
|
-
import { LinkedEditingFeature } from 'vscode-languageclient/lib/common/linkedEditingRange.js';
|
|
31
|
-
import { InlayHintsFeature } from 'vscode-languageclient/lib/common/inlayHint.js';
|
|
32
|
-
import { DiagnosticFeature } from 'vscode-languageclient/lib/common/diagnostic.js';
|
|
33
|
-
import { ProgressFeature } from 'vscode-languageclient/lib/common/progress.js';
|
|
34
|
-
import { WorkspaceSymbolFeature } from 'vscode-languageclient/lib/common/workspaceSymbol.js';
|
|
35
|
-
import { CallHierarchyFeature } from 'vscode-languageclient/lib/common/callHierarchy.js';
|
|
36
|
-
import { DidCreateFilesFeature, DidDeleteFilesFeature, DidRenameFilesFeature, WillCreateFilesFeature, WillDeleteFilesFeature, WillRenameFilesFeature } from 'vscode-languageclient/lib/common/fileOperations.js';
|
|
37
|
-
import { TypeHierarchyFeature } from 'vscode-languageclient/lib/common/typeHierarchy.js';
|
|
38
|
-
import { InlineValueFeature } from 'vscode-languageclient/lib/common/inlineValue.js';
|
|
39
|
-
import { NotebookDocumentSyncFeature } from 'vscode-languageclient/lib/common/notebook.js';
|
|
40
6
|
export class MonacoLanguageClient extends BaseLanguageClient {
|
|
41
7
|
connectionProvider;
|
|
42
8
|
constructor({ id, name, clientOptions, connectionProvider }) {
|
|
43
9
|
super(id || name.toLowerCase(), name, clientOptions);
|
|
44
10
|
this.connectionProvider = connectionProvider;
|
|
45
|
-
// Hack because vscode-language client rejects the whole registration block if one capability registration has no associated client feature registered
|
|
46
|
-
// Some language servers still send the registration even though the client says it doesn't support it
|
|
47
|
-
const originalHandleRegistrationRequest = this['handleRegistrationRequest'].bind(this);
|
|
48
|
-
this['handleRegistrationRequest'] = (params) => {
|
|
49
|
-
originalHandleRegistrationRequest({
|
|
50
|
-
...params,
|
|
51
|
-
registrations: params.registrations.filter(registration => this.getFeature(registration.method) != null)
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
const originalHandleUnregistrationRequest = this['handleUnregistrationRequest'].bind(this);
|
|
55
|
-
this['handleUnregistrationRequest'] = (params) => {
|
|
56
|
-
originalHandleUnregistrationRequest({
|
|
57
|
-
...params,
|
|
58
|
-
unregisterations: params.unregisterations.filter(unregistration => this.getFeature(unregistration.method) != null)
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
11
|
}
|
|
62
12
|
createMessageTransports(encoding) {
|
|
63
13
|
return this.connectionProvider.get(encoding);
|
|
64
14
|
}
|
|
65
15
|
getLocale() {
|
|
66
|
-
return
|
|
67
|
-
}
|
|
68
|
-
registerBuiltinFeatures() {
|
|
69
|
-
const pendingFullTextDocumentChanges = new Map();
|
|
70
|
-
this.registerFeature(new ConfigurationFeature(this));
|
|
71
|
-
this.registerFeature(new DidOpenTextDocumentFeature(this, this['_syncedDocuments']));
|
|
72
|
-
this['_didChangeTextDocumentFeature'] = new DidChangeTextDocumentFeature(this, pendingFullTextDocumentChanges);
|
|
73
|
-
this['_didChangeTextDocumentFeature'].onPendingChangeAdded(() => {
|
|
74
|
-
this['triggerPendingChangeDelivery']();
|
|
75
|
-
});
|
|
76
|
-
this.registerFeature(this['_didChangeTextDocumentFeature']);
|
|
77
|
-
this.registerFeature(new DidCloseTextDocumentFeature(this, this['_syncedDocuments'], pendingFullTextDocumentChanges));
|
|
78
|
-
this.registerFeature(new CompletionItemFeature(this));
|
|
79
|
-
this.registerFeature(new HoverFeature(this));
|
|
80
|
-
this.registerFeature(new SignatureHelpFeature(this));
|
|
81
|
-
this.registerFeature(new DefinitionFeature(this));
|
|
82
|
-
this.registerFeature(new ReferencesFeature(this));
|
|
83
|
-
this.registerFeature(new DocumentHighlightFeature(this));
|
|
84
|
-
this.registerFeature(new DocumentSymbolFeature(this));
|
|
85
|
-
this.registerFeature(new CodeActionFeature(this));
|
|
86
|
-
this.registerFeature(new CodeLensFeature(this));
|
|
87
|
-
this.registerFeature(new DocumentFormattingFeature(this));
|
|
88
|
-
this.registerFeature(new DocumentRangeFormattingFeature(this));
|
|
89
|
-
this.registerFeature(new DocumentOnTypeFormattingFeature(this));
|
|
90
|
-
this.registerFeature(new RenameFeature(this));
|
|
91
|
-
this.registerFeature(new DocumentLinkFeature(this));
|
|
92
|
-
this.registerFeature(new ExecuteCommandFeature(this));
|
|
93
|
-
this.registerFeature(new SyncConfigurationFeature(this));
|
|
94
|
-
this.registerFeature(new TypeDefinitionFeature(this));
|
|
95
|
-
this.registerFeature(new ImplementationFeature(this));
|
|
96
|
-
this.registerFeature(new ColorProviderFeature(this));
|
|
97
|
-
// We only register the workspace folder feature if the client is not locked
|
|
98
|
-
// to a specific workspace folder.
|
|
99
|
-
if (this.clientOptions.workspaceFolder === undefined) {
|
|
100
|
-
this.registerFeature(new WorkspaceFoldersFeature(this));
|
|
101
|
-
}
|
|
102
|
-
this.registerFeature(new FoldingRangeFeature(this));
|
|
103
|
-
this.registerFeature(new DeclarationFeature(this));
|
|
104
|
-
this.registerFeature(new SelectionRangeFeature(this));
|
|
105
|
-
this.registerFeature(new SemanticTokensFeature(this));
|
|
106
|
-
this.registerFeature(new LinkedEditingFeature(this));
|
|
107
|
-
this.registerFeature(new InlayHintsFeature(this));
|
|
108
|
-
this.registerFeature(new DiagnosticFeature(this));
|
|
109
|
-
// enabled since monaco-vscode-api 1.78.5 (PR https://github.com/CodinGame/monaco-vscode-api/pull/109)
|
|
110
|
-
this.registerFeature(new WillSaveFeature(this));
|
|
111
|
-
this.registerFeature(new WillSaveWaitUntilFeature(this));
|
|
112
|
-
this.registerFeature(new DidSaveTextDocumentFeature(this));
|
|
113
|
-
// enabled since monaco-vscode-api 1.79.0 (PR https://github.com/CodinGame/monaco-vscode-api/pull/110)
|
|
114
|
-
this.registerFeature(new WorkspaceSymbolFeature(this));
|
|
115
|
-
this.registerFeature(new DidCreateFilesFeature(this));
|
|
116
|
-
this.registerFeature(new DidRenameFilesFeature(this));
|
|
117
|
-
this.registerFeature(new DidDeleteFilesFeature(this));
|
|
118
|
-
this.registerFeature(new WillCreateFilesFeature(this));
|
|
119
|
-
this.registerFeature(new WillRenameFilesFeature(this));
|
|
120
|
-
this.registerFeature(new WillDeleteFilesFeature(this));
|
|
121
|
-
this.registerFeature(new CallHierarchyFeature(this));
|
|
122
|
-
this.registerFeature(new TypeHierarchyFeature(this));
|
|
123
|
-
this.registerFeature(new InlineValueFeature(this));
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* These are all contained in BaseLanguageClient#registerBuiltinFeatures but not registered
|
|
127
|
-
* in MonacoLanguageClient. This method is not called!
|
|
128
|
-
*/
|
|
129
|
-
registerNotUsedFeatures() {
|
|
130
|
-
// these will stay unsupported for now
|
|
131
|
-
this.registerFeature(new ProgressFeature(this));
|
|
132
|
-
this.registerFeature(new NotebookDocumentSyncFeature(this));
|
|
16
|
+
return super.getLocale() || 'en-US';
|
|
133
17
|
}
|
|
134
18
|
}
|
|
135
19
|
//# sourceMappingURL=monaco-language-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monaco-language-client.js","sourceRoot":"","sources":["../src/monaco-language-client.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,
|
|
1
|
+
{"version":3,"file":"monaco-language-client.js","sourceRoot":"","sources":["../src/monaco-language-client.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAE,kBAAkB,EAA4C,MAAM,4CAA4C,CAAC;AAa1H,MAAM,OAAO,oBAAqB,SAAQ,kBAAkB;IACrC,kBAAkB,CAAsB;IAE3D,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,kBAAkB,EAA+B;QACpF,KAAK,CAAC,EAAE,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;QACrD,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;IACjD,CAAC;IAES,uBAAuB,CAAC,QAAgB;QAC9C,OAAO,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACjD,CAAC;IAEkB,SAAS;QACxB,OAAO,KAAK,CAAC,SAAS,EAAE,IAAI,OAAO,CAAC;IACxC,CAAC;CACJ"}
|
|
@@ -3,14 +3,11 @@ import { LogLevel } from 'vscode/services';
|
|
|
3
3
|
import type { OpenEditor } from 'vscode/service-override/editor';
|
|
4
4
|
import { ITerminalBackend, SimpleTerminalBackend } from 'vscode/service-override/terminal';
|
|
5
5
|
export type InitializeServiceConfig = {
|
|
6
|
-
enableFilesService?: boolean;
|
|
7
|
-
enableExtensionsService?: boolean;
|
|
8
6
|
enableDialogService?: boolean;
|
|
9
7
|
enableNotificationService?: boolean;
|
|
10
8
|
enableModelService?: boolean;
|
|
11
9
|
configureEditorOrViewsServiceConfig?: {
|
|
12
|
-
enableViewsService
|
|
13
|
-
useDefaultOpenEditorFunction: boolean;
|
|
10
|
+
enableViewsService?: boolean;
|
|
14
11
|
openEditorFunc?: OpenEditor;
|
|
15
12
|
};
|
|
16
13
|
configureConfigurationServiceConfig?: {
|
|
@@ -32,8 +29,6 @@ export type InitializeServiceConfig = {
|
|
|
32
29
|
enableSearchService?: boolean;
|
|
33
30
|
enableMarkersService?: boolean;
|
|
34
31
|
enableAccessibilityService?: boolean;
|
|
35
|
-
enableEnvironmentService?: boolean;
|
|
36
|
-
enableLayoutService?: boolean;
|
|
37
32
|
enableLanguageDetectionWorkerService?: boolean;
|
|
38
33
|
userServices?: editor.IEditorOverrideServices;
|
|
39
34
|
debugLogging?: boolean;
|
|
@@ -41,4 +36,11 @@ export type InitializeServiceConfig = {
|
|
|
41
36
|
};
|
|
42
37
|
export declare const wasVscodeApiInitialized: () => boolean;
|
|
43
38
|
export declare const initServices: (config?: InitializeServiceConfig) => Promise<void>;
|
|
39
|
+
export type ModuleWithDefaultExport = {
|
|
40
|
+
default: (x?: any) => editor.IEditorOverrideServices;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* files, extension, environment and layout services are loaded automatically by monaco-vscode-api
|
|
44
|
+
*/
|
|
45
|
+
export declare const importAllServices: (config?: InitializeServiceConfig) => Promise<void>;
|
|
44
46
|
//# sourceMappingURL=monaco-vscode-api-services.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monaco-vscode-api-services.d.ts","sourceRoot":"","sources":["../src/monaco-vscode-api-services.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAoB,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAsD,QAAQ,EAAsB,MAAM,iBAAiB,CAAC;AAEnH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAM3F,MAAM,MAAM,uBAAuB,GAAG;IAClC,
|
|
1
|
+
{"version":3,"file":"monaco-vscode-api-services.d.ts","sourceRoot":"","sources":["../src/monaco-vscode-api-services.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAoB,MAAM,2CAA2C,CAAC;AACrF,OA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,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACtB,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAEnC,CAAC;AAEF,eAAO,MAAM,YAAY,YAAmB,uBAAuB,kBAkBlE,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IAClC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,MAAM,CAAC,uBAAuB,CAAA;CACvD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,YAAmB,uBAAuB,kBA6KvE,CAAC"}
|
|
@@ -26,26 +26,23 @@ export const initServices = async (config) => {
|
|
|
26
26
|
}
|
|
27
27
|
window.MonacoEnvironment.vscodeApiInitialised = true;
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
/**
|
|
30
|
+
* files, extension, environment and layout services are loaded automatically by monaco-vscode-api
|
|
31
|
+
*/
|
|
32
|
+
export const importAllServices = async (config) => {
|
|
31
33
|
const serviceNames = [];
|
|
34
|
+
const promises = [];
|
|
32
35
|
const lc = config ?? {};
|
|
33
36
|
const userServices = lc.userServices ?? {};
|
|
34
37
|
const addService = (name, promise) => {
|
|
35
|
-
promises.push(promise);
|
|
36
38
|
serviceNames.push(name);
|
|
39
|
+
promises.push(promise);
|
|
37
40
|
};
|
|
38
|
-
if (lc.enableFilesService === true) {
|
|
39
|
-
addService('files', import('vscode/service-override/files'));
|
|
40
|
-
}
|
|
41
|
-
if (lc.enableExtensionsService === true) {
|
|
42
|
-
addService('extensions', import('vscode/service-override/extensions'));
|
|
43
|
-
}
|
|
44
41
|
if (lc.enableModelService === true) {
|
|
45
42
|
addService('model', import('vscode/service-override/model'));
|
|
46
43
|
}
|
|
47
44
|
if (lc.configureEditorOrViewsServiceConfig !== undefined) {
|
|
48
|
-
if (lc.configureEditorOrViewsServiceConfig.enableViewsService) {
|
|
45
|
+
if (lc.configureEditorOrViewsServiceConfig.enableViewsService === true) {
|
|
49
46
|
addService('views', import('vscode/service-override/views'));
|
|
50
47
|
}
|
|
51
48
|
else {
|
|
@@ -103,12 +100,6 @@ const importAllServices = async (config) => {
|
|
|
103
100
|
if (lc.enableAccessibilityService === true) {
|
|
104
101
|
addService('accessibility', import('vscode/service-override/accessibility'));
|
|
105
102
|
}
|
|
106
|
-
if (lc.enableEnvironmentService === true) {
|
|
107
|
-
addService('environment', import('vscode/service-override/environment'));
|
|
108
|
-
}
|
|
109
|
-
if (lc.enableLayoutService === true) {
|
|
110
|
-
addService('layout', import('vscode/service-override/layout'));
|
|
111
|
-
}
|
|
112
103
|
if (lc.enableLanguageDetectionWorkerService === true) {
|
|
113
104
|
addService('languageDetectionWorker', import('vscode/service-override/languageDetectionWorker'));
|
|
114
105
|
}
|
|
@@ -136,7 +127,6 @@ const importAllServices = async (config) => {
|
|
|
136
127
|
mergeServices(userServices, overrideServices);
|
|
137
128
|
reportServiceLoading(userServices, lc.debugLogging === true, 'user');
|
|
138
129
|
}
|
|
139
|
-
// files service and extension service are loaded automatically by monaco-vscode-api
|
|
140
130
|
// theme requires textmate
|
|
141
131
|
if ((serviceNames.includes('theme') || Object.keys(overrideServices).includes('themeService')) &&
|
|
142
132
|
!(serviceNames.includes('textmate') || Object.keys(overrideServices).includes('textMateTokenizationFeature'))) {
|
|
@@ -159,16 +149,16 @@ const importAllServices = async (config) => {
|
|
|
159
149
|
}
|
|
160
150
|
let services = {};
|
|
161
151
|
if (serviceName === 'editor' || serviceName === 'views') {
|
|
162
|
-
if (lc.configureEditorOrViewsServiceConfig
|
|
152
|
+
if (lc.configureEditorOrViewsServiceConfig?.openEditorFunc) {
|
|
153
|
+
services = loadedImport.default(lc.configureEditorOrViewsServiceConfig.openEditorFunc);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
163
156
|
const defaultOpenEditorFunc = async (model, options, sideBySide) => {
|
|
164
157
|
console.log('Trying to open a model', model, options, sideBySide);
|
|
165
158
|
return undefined;
|
|
166
159
|
};
|
|
167
160
|
services = loadedImport.default(defaultOpenEditorFunc);
|
|
168
161
|
}
|
|
169
|
-
else if (lc.configureEditorOrViewsServiceConfig?.openEditorFunc) {
|
|
170
|
-
services = loadedImport.default(lc.configureEditorOrViewsServiceConfig.openEditorFunc);
|
|
171
|
-
}
|
|
172
162
|
}
|
|
173
163
|
else if (serviceName === 'configuration') {
|
|
174
164
|
if (lc.configureConfigurationServiceConfig?.defaultWorkspaceUri) {
|
|
@@ -181,6 +171,19 @@ const importAllServices = async (config) => {
|
|
|
181
171
|
services = loadedImport.default(lc.configureTerminalServiceConfig.backendImpl);
|
|
182
172
|
}
|
|
183
173
|
}
|
|
174
|
+
else if (serviceName === 'quickaccess') {
|
|
175
|
+
if (lc.configureEditorOrViewsServiceConfig?.enableViewsService === true) {
|
|
176
|
+
const { isEditorPartVisible } = await import('vscode/service-override/views');
|
|
177
|
+
services = loadedImport.default({
|
|
178
|
+
isKeybindingConfigurationVisible: isEditorPartVisible,
|
|
179
|
+
shouldUseGlobalPicker: isEditorPartVisible
|
|
180
|
+
});
|
|
181
|
+
services = loadedImport.default();
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
services = loadedImport.default();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
184
187
|
else {
|
|
185
188
|
services = loadedImport.default();
|
|
186
189
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monaco-vscode-api-services.js","sourceRoot":"","sources":["../src/monaco-vscode-api-services.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,OAAO,EAAuB,GAAG,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,UAAU,IAAI,uBAAuB,EAAY,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACnH,OAAO,EAAE,UAAU,IAAI,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"monaco-vscode-api-services.js","sourceRoot":"","sources":["../src/monaco-vscode-api-services.ts"],"names":[],"mappings":"AAAA;;;gGAGg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AY,CAAC,OAAO,CAAC;oBAC5B,gCAAgC,EAAE,mBAAmB;oBACrD,qBAAqB,EAAE,mBAAmB;iBAC7C,CAAC,CAAC;gBACH,QAAQ,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;aACrC;iBAAM;gBACH,QAAQ,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;aACrC;SACJ;aAAM;YACH,QAAQ,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC;SACrC;QAED,aAAa,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;QAC1C,oBAAoB,CAAC,QAAQ,EAAE,EAAE,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC;QAEzD,KAAK,EAAE,CAAC;KACX;IAED,MAAM,uBAAuB,CAAC,gBAAgB,CAAC,CAAC;IAChD,IAAI,EAAE,CAAC,QAAQ,EAAE;QACb,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;KAC7D;AACL,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monaco-languageclient",
|
|
3
|
-
"version": "6.3.0
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Monaco Language client implementation",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "TypeFox GmbH",
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"monaco-editor": "~0.40.0",
|
|
52
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.80.
|
|
52
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.80.2",
|
|
53
53
|
"vscode-jsonrpc": "~8.1.0",
|
|
54
54
|
"vscode-languageclient": "~8.1.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"monaco-editor": "~0.40.0",
|
|
58
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.80.
|
|
58
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.80.2"
|
|
59
59
|
},
|
|
60
60
|
"peerDependenciesMeta": {
|
|
61
61
|
"monaco-editor": {
|
package/src/index.ts
CHANGED
|
@@ -3,5 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
|
|
6
|
+
export type { IConnectionProvider, MonacoLanguageClientOptions } from './monaco-language-client.js';
|
|
6
7
|
export * from './monaco-language-client.js';
|
|
7
8
|
export * from './monaco-vscode-api-services.js';
|
|
@@ -3,72 +3,25 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
|
|
6
|
-
/* eslint-disable @typescript-eslint/dot-notation */
|
|
7
|
-
|
|
8
6
|
import { BaseLanguageClient, MessageTransports, LanguageClientOptions } from 'vscode-languageclient/lib/common/client.js';
|
|
9
|
-
import { ConfigurationFeature, SyncConfigurationFeature } from 'vscode-languageclient/lib/common/configuration.js';
|
|
10
|
-
import { DidChangeTextDocumentFeature, DidCloseTextDocumentFeature, DidOpenTextDocumentFeature, DidSaveTextDocumentFeature, WillSaveFeature, WillSaveWaitUntilFeature } from 'vscode-languageclient/lib/common/textSynchronization.js';
|
|
11
|
-
import { CompletionItemFeature } from 'vscode-languageclient/lib/common/completion.js';
|
|
12
|
-
import { HoverFeature } from 'vscode-languageclient/lib/common/hover.js';
|
|
13
|
-
import { SignatureHelpFeature } from 'vscode-languageclient/lib/common/signatureHelp.js';
|
|
14
|
-
import { DefinitionFeature } from 'vscode-languageclient/lib/common/definition.js';
|
|
15
|
-
import { ReferencesFeature } from 'vscode-languageclient/lib/common/reference.js';
|
|
16
|
-
import { DocumentHighlightFeature } from 'vscode-languageclient/lib/common/documentHighlight.js';
|
|
17
|
-
import { DocumentSymbolFeature } from 'vscode-languageclient/lib/common/documentSymbol.js';
|
|
18
|
-
import { CodeActionFeature } from 'vscode-languageclient/lib/common/codeAction.js';
|
|
19
|
-
import { CodeLensFeature } from 'vscode-languageclient/lib/common/codeLens.js';
|
|
20
|
-
import { DocumentFormattingFeature, DocumentOnTypeFormattingFeature, DocumentRangeFormattingFeature } from 'vscode-languageclient/lib/common/formatting.js';
|
|
21
|
-
import { RenameFeature } from 'vscode-languageclient/lib/common/rename.js';
|
|
22
|
-
import { DocumentLinkFeature } from 'vscode-languageclient/lib/common/documentLink.js';
|
|
23
|
-
import { ExecuteCommandFeature } from 'vscode-languageclient/lib/common/executeCommand.js';
|
|
24
|
-
import { TypeDefinitionFeature } from 'vscode-languageclient/lib/common/typeDefinition.js';
|
|
25
|
-
import { ImplementationFeature } from 'vscode-languageclient/lib/common/implementation.js';
|
|
26
|
-
import { ColorProviderFeature } from 'vscode-languageclient/lib/common/colorProvider.js';
|
|
27
|
-
import { WorkspaceFoldersFeature } from 'vscode-languageclient/lib/common/workspaceFolder.js';
|
|
28
|
-
import { FoldingRangeFeature } from 'vscode-languageclient/lib/common/foldingRange.js';
|
|
29
|
-
import { DeclarationFeature } from 'vscode-languageclient/lib/common/declaration.js';
|
|
30
|
-
import { SelectionRangeFeature } from 'vscode-languageclient/lib/common/selectionRange.js';
|
|
31
|
-
import { SemanticTokensFeature } from 'vscode-languageclient/lib/common/semanticTokens.js';
|
|
32
|
-
import { LinkedEditingFeature } from 'vscode-languageclient/lib/common/linkedEditingRange.js';
|
|
33
|
-
import { InlayHintsFeature } from 'vscode-languageclient/lib/common/inlayHint.js';
|
|
34
|
-
import { DiagnosticFeature } from 'vscode-languageclient/lib/common/diagnostic.js';
|
|
35
|
-
import { ProgressFeature } from 'vscode-languageclient/lib/common/progress.js';
|
|
36
|
-
import { RegistrationParams, UnregistrationParams } from 'vscode-languageclient';
|
|
37
|
-
import { TextDocument } from 'vscode';
|
|
38
|
-
import { WorkspaceSymbolFeature } from 'vscode-languageclient/lib/common/workspaceSymbol.js';
|
|
39
|
-
import { CallHierarchyFeature } from 'vscode-languageclient/lib/common/callHierarchy.js';
|
|
40
|
-
import { DidCreateFilesFeature, DidDeleteFilesFeature, DidRenameFilesFeature, WillCreateFilesFeature, WillDeleteFilesFeature, WillRenameFilesFeature } from 'vscode-languageclient/lib/common/fileOperations.js';
|
|
41
|
-
import { TypeHierarchyFeature } from 'vscode-languageclient/lib/common/typeHierarchy.js';
|
|
42
|
-
import { InlineValueFeature } from 'vscode-languageclient/lib/common/inlineValue.js';
|
|
43
|
-
import { NotebookDocumentSyncFeature } from 'vscode-languageclient/lib/common/notebook.js';
|
|
44
7
|
|
|
45
8
|
export interface IConnectionProvider {
|
|
46
9
|
get(encoding: string): Promise<MessageTransports>;
|
|
47
10
|
}
|
|
48
11
|
|
|
12
|
+
export type MonacoLanguageClientOptions = {
|
|
13
|
+
name: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
clientOptions: LanguageClientOptions;
|
|
16
|
+
connectionProvider: IConnectionProvider;
|
|
17
|
+
}
|
|
18
|
+
|
|
49
19
|
export class MonacoLanguageClient extends BaseLanguageClient {
|
|
50
20
|
protected readonly connectionProvider: IConnectionProvider;
|
|
51
21
|
|
|
52
|
-
constructor({ id, name, clientOptions, connectionProvider }:
|
|
22
|
+
constructor({ id, name, clientOptions, connectionProvider }: MonacoLanguageClientOptions) {
|
|
53
23
|
super(id || name.toLowerCase(), name, clientOptions);
|
|
54
24
|
this.connectionProvider = connectionProvider;
|
|
55
|
-
|
|
56
|
-
// Hack because vscode-language client rejects the whole registration block if one capability registration has no associated client feature registered
|
|
57
|
-
// Some language servers still send the registration even though the client says it doesn't support it
|
|
58
|
-
const originalHandleRegistrationRequest: (params: RegistrationParams) => Promise<void> = this['handleRegistrationRequest'].bind(this);
|
|
59
|
-
this['handleRegistrationRequest'] = (params: RegistrationParams) => {
|
|
60
|
-
originalHandleRegistrationRequest({
|
|
61
|
-
...params,
|
|
62
|
-
registrations: params.registrations.filter(registration => this.getFeature(<any>registration.method) != null)
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
const originalHandleUnregistrationRequest: (params: UnregistrationParams) => Promise<void> = this['handleUnregistrationRequest'].bind(this);
|
|
66
|
-
this['handleUnregistrationRequest'] = (params: UnregistrationParams) => {
|
|
67
|
-
originalHandleUnregistrationRequest({
|
|
68
|
-
...params,
|
|
69
|
-
unregisterations: params.unregisterations.filter(unregistration => this.getFeature(<any>unregistration.method) != null)
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
25
|
}
|
|
73
26
|
|
|
74
27
|
protected createMessageTransports(encoding: string): Promise<MessageTransports> {
|
|
@@ -76,82 +29,6 @@ export class MonacoLanguageClient extends BaseLanguageClient {
|
|
|
76
29
|
}
|
|
77
30
|
|
|
78
31
|
protected override getLocale(): string {
|
|
79
|
-
return
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
protected override registerBuiltinFeatures() {
|
|
83
|
-
const pendingFullTextDocumentChanges: Map<string, TextDocument> = new Map();
|
|
84
|
-
this.registerFeature(new ConfigurationFeature(this));
|
|
85
|
-
this.registerFeature(new DidOpenTextDocumentFeature(this, this['_syncedDocuments']));
|
|
86
|
-
this['_didChangeTextDocumentFeature'] = new DidChangeTextDocumentFeature(this, pendingFullTextDocumentChanges);
|
|
87
|
-
this['_didChangeTextDocumentFeature'].onPendingChangeAdded(() => {
|
|
88
|
-
this['triggerPendingChangeDelivery']();
|
|
89
|
-
});
|
|
90
|
-
this.registerFeature(this['_didChangeTextDocumentFeature']);
|
|
91
|
-
this.registerFeature(new DidCloseTextDocumentFeature(this, this['_syncedDocuments'], pendingFullTextDocumentChanges));
|
|
92
|
-
this.registerFeature(new CompletionItemFeature(this));
|
|
93
|
-
this.registerFeature(new HoverFeature(this));
|
|
94
|
-
this.registerFeature(new SignatureHelpFeature(this));
|
|
95
|
-
this.registerFeature(new DefinitionFeature(this));
|
|
96
|
-
this.registerFeature(new ReferencesFeature(this));
|
|
97
|
-
this.registerFeature(new DocumentHighlightFeature(this));
|
|
98
|
-
this.registerFeature(new DocumentSymbolFeature(this));
|
|
99
|
-
this.registerFeature(new CodeActionFeature(this));
|
|
100
|
-
this.registerFeature(new CodeLensFeature(this));
|
|
101
|
-
this.registerFeature(new DocumentFormattingFeature(this));
|
|
102
|
-
this.registerFeature(new DocumentRangeFormattingFeature(this));
|
|
103
|
-
this.registerFeature(new DocumentOnTypeFormattingFeature(this));
|
|
104
|
-
this.registerFeature(new RenameFeature(this));
|
|
105
|
-
this.registerFeature(new DocumentLinkFeature(this));
|
|
106
|
-
this.registerFeature(new ExecuteCommandFeature(this));
|
|
107
|
-
this.registerFeature(new SyncConfigurationFeature(this));
|
|
108
|
-
this.registerFeature(new TypeDefinitionFeature(this));
|
|
109
|
-
this.registerFeature(new ImplementationFeature(this));
|
|
110
|
-
this.registerFeature(new ColorProviderFeature(this));
|
|
111
|
-
// We only register the workspace folder feature if the client is not locked
|
|
112
|
-
// to a specific workspace folder.
|
|
113
|
-
if (this.clientOptions.workspaceFolder === undefined) {
|
|
114
|
-
this.registerFeature(new WorkspaceFoldersFeature(this));
|
|
115
|
-
}
|
|
116
|
-
this.registerFeature(new FoldingRangeFeature(this));
|
|
117
|
-
this.registerFeature(new DeclarationFeature(this));
|
|
118
|
-
this.registerFeature(new SelectionRangeFeature(this));
|
|
119
|
-
this.registerFeature(new SemanticTokensFeature(this));
|
|
120
|
-
this.registerFeature(new LinkedEditingFeature(this));
|
|
121
|
-
this.registerFeature(new InlayHintsFeature(this));
|
|
122
|
-
this.registerFeature(new DiagnosticFeature(this));
|
|
123
|
-
// enabled since monaco-vscode-api 1.78.5 (PR https://github.com/CodinGame/monaco-vscode-api/pull/109)
|
|
124
|
-
this.registerFeature(new WillSaveFeature(this));
|
|
125
|
-
this.registerFeature(new WillSaveWaitUntilFeature(this));
|
|
126
|
-
this.registerFeature(new DidSaveTextDocumentFeature(this));
|
|
127
|
-
// enabled since monaco-vscode-api 1.79.0 (PR https://github.com/CodinGame/monaco-vscode-api/pull/110)
|
|
128
|
-
this.registerFeature(new WorkspaceSymbolFeature(this));
|
|
129
|
-
this.registerFeature(new DidCreateFilesFeature(this));
|
|
130
|
-
this.registerFeature(new DidRenameFilesFeature(this));
|
|
131
|
-
this.registerFeature(new DidDeleteFilesFeature(this));
|
|
132
|
-
this.registerFeature(new WillCreateFilesFeature(this));
|
|
133
|
-
this.registerFeature(new WillRenameFilesFeature(this));
|
|
134
|
-
this.registerFeature(new WillDeleteFilesFeature(this));
|
|
135
|
-
this.registerFeature(new CallHierarchyFeature(this));
|
|
136
|
-
this.registerFeature(new TypeHierarchyFeature(this));
|
|
137
|
-
this.registerFeature(new InlineValueFeature(this));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* These are all contained in BaseLanguageClient#registerBuiltinFeatures but not registered
|
|
142
|
-
* in MonacoLanguageClient. This method is not called!
|
|
143
|
-
*/
|
|
144
|
-
public registerNotUsedFeatures() {
|
|
145
|
-
// these will stay unsupported for now
|
|
146
|
-
this.registerFeature(new ProgressFeature(this));
|
|
147
|
-
this.registerFeature(new NotebookDocumentSyncFeature(this));
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
export namespace MonacoLanguageClient {
|
|
151
|
-
export interface Options {
|
|
152
|
-
name: string;
|
|
153
|
-
id?: string;
|
|
154
|
-
clientOptions: LanguageClientOptions;
|
|
155
|
-
connectionProvider: IConnectionProvider;
|
|
32
|
+
return super.getLocale() || 'en-US';
|
|
156
33
|
}
|
|
157
34
|
}
|
|
@@ -14,14 +14,11 @@ interface MonacoEnvironmentEnhanced extends Environment {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export type InitializeServiceConfig = {
|
|
17
|
-
enableFilesService?: boolean;
|
|
18
|
-
enableExtensionsService?: boolean;
|
|
19
17
|
enableDialogService?: boolean;
|
|
20
18
|
enableNotificationService?: boolean;
|
|
21
19
|
enableModelService?: boolean;
|
|
22
20
|
configureEditorOrViewsServiceConfig?: {
|
|
23
|
-
enableViewsService
|
|
24
|
-
useDefaultOpenEditorFunction: boolean;
|
|
21
|
+
enableViewsService?: boolean;
|
|
25
22
|
openEditorFunc?: OpenEditor
|
|
26
23
|
};
|
|
27
24
|
configureConfigurationServiceConfig?: {
|
|
@@ -43,8 +40,6 @@ export type InitializeServiceConfig = {
|
|
|
43
40
|
enableSearchService?: boolean;
|
|
44
41
|
enableMarkersService?: boolean;
|
|
45
42
|
enableAccessibilityService?: boolean;
|
|
46
|
-
enableEnvironmentService?: boolean;
|
|
47
|
-
enableLayoutService?: boolean;
|
|
48
43
|
enableLanguageDetectionWorkerService?: boolean;
|
|
49
44
|
userServices?: editor.IEditorOverrideServices;
|
|
50
45
|
debugLogging?: boolean;
|
|
@@ -75,32 +70,29 @@ export const initServices = async (config?: InitializeServiceConfig) => {
|
|
|
75
70
|
(window.MonacoEnvironment as MonacoEnvironmentEnhanced).vscodeApiInitialised = true;
|
|
76
71
|
};
|
|
77
72
|
|
|
78
|
-
type ModuleWithDefaultExport = {
|
|
73
|
+
export type ModuleWithDefaultExport = {
|
|
79
74
|
default: (x?: any) => editor.IEditorOverrideServices
|
|
80
75
|
}
|
|
81
76
|
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
/**
|
|
78
|
+
* files, extension, environment and layout services are loaded automatically by monaco-vscode-api
|
|
79
|
+
*/
|
|
80
|
+
export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
84
81
|
const serviceNames: string[] = [];
|
|
82
|
+
const promises: Promise<ModuleWithDefaultExport>[] = [];
|
|
85
83
|
const lc: InitializeServiceConfig = config ?? {};
|
|
86
84
|
const userServices = lc.userServices ?? {};
|
|
87
85
|
|
|
88
86
|
const addService = (name: string, promise: Promise<ModuleWithDefaultExport>) => {
|
|
89
|
-
promises.push(promise);
|
|
90
87
|
serviceNames.push(name);
|
|
88
|
+
promises.push(promise);
|
|
91
89
|
};
|
|
92
90
|
|
|
93
|
-
if (lc.enableFilesService === true) {
|
|
94
|
-
addService('files', import('vscode/service-override/files'));
|
|
95
|
-
}
|
|
96
|
-
if (lc.enableExtensionsService === true) {
|
|
97
|
-
addService('extensions', import('vscode/service-override/extensions'));
|
|
98
|
-
}
|
|
99
91
|
if (lc.enableModelService === true) {
|
|
100
92
|
addService('model', import('vscode/service-override/model'));
|
|
101
93
|
}
|
|
102
94
|
if (lc.configureEditorOrViewsServiceConfig !== undefined) {
|
|
103
|
-
if (lc.configureEditorOrViewsServiceConfig.enableViewsService) {
|
|
95
|
+
if (lc.configureEditorOrViewsServiceConfig.enableViewsService === true) {
|
|
104
96
|
addService('views', import('vscode/service-override/views'));
|
|
105
97
|
} else {
|
|
106
98
|
addService('editor', import('vscode/service-override/editor'));
|
|
@@ -157,12 +149,6 @@ const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
157
149
|
if (lc.enableAccessibilityService === true) {
|
|
158
150
|
addService('accessibility', import('vscode/service-override/accessibility'));
|
|
159
151
|
}
|
|
160
|
-
if (lc.enableEnvironmentService === true) {
|
|
161
|
-
addService('environment', import('vscode/service-override/environment'));
|
|
162
|
-
}
|
|
163
|
-
if (lc.enableLayoutService === true) {
|
|
164
|
-
addService('layout', import('vscode/service-override/layout'));
|
|
165
|
-
}
|
|
166
152
|
if (lc.enableLanguageDetectionWorkerService === true) {
|
|
167
153
|
addService('languageDetectionWorker', import('vscode/service-override/languageDetectionWorker'));
|
|
168
154
|
}
|
|
@@ -193,8 +179,6 @@ const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
193
179
|
reportServiceLoading(userServices, lc.debugLogging === true, 'user');
|
|
194
180
|
}
|
|
195
181
|
|
|
196
|
-
// files service and extension service are loaded automatically by monaco-vscode-api
|
|
197
|
-
|
|
198
182
|
// theme requires textmate
|
|
199
183
|
if ((serviceNames.includes('theme') || Object.keys(overrideServices).includes('themeService')) &&
|
|
200
184
|
!(serviceNames.includes('textmate') || Object.keys(overrideServices).includes('textMateTokenizationFeature'))) {
|
|
@@ -221,14 +205,14 @@ const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
221
205
|
|
|
222
206
|
let services: editor.IEditorOverrideServices = {};
|
|
223
207
|
if (serviceName === 'editor' || serviceName === 'views') {
|
|
224
|
-
if (lc.configureEditorOrViewsServiceConfig
|
|
208
|
+
if (lc.configureEditorOrViewsServiceConfig?.openEditorFunc) {
|
|
209
|
+
services = loadedImport.default(lc.configureEditorOrViewsServiceConfig.openEditorFunc);
|
|
210
|
+
} else {
|
|
225
211
|
const defaultOpenEditorFunc: OpenEditor = async (model, options, sideBySide) => {
|
|
226
212
|
console.log('Trying to open a model', model, options, sideBySide);
|
|
227
213
|
return undefined;
|
|
228
214
|
};
|
|
229
215
|
services = loadedImport.default(defaultOpenEditorFunc);
|
|
230
|
-
} else if (lc.configureEditorOrViewsServiceConfig?.openEditorFunc) {
|
|
231
|
-
services = loadedImport.default(lc.configureEditorOrViewsServiceConfig.openEditorFunc);
|
|
232
216
|
}
|
|
233
217
|
} else if (serviceName === 'configuration') {
|
|
234
218
|
if (lc.configureConfigurationServiceConfig?.defaultWorkspaceUri) {
|
|
@@ -239,6 +223,19 @@ const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
239
223
|
if (lc.configureTerminalServiceConfig?.backendImpl) {
|
|
240
224
|
services = loadedImport.default(lc.configureTerminalServiceConfig.backendImpl);
|
|
241
225
|
}
|
|
226
|
+
} else if (serviceName === 'quickaccess') {
|
|
227
|
+
if (lc.configureEditorOrViewsServiceConfig?.enableViewsService === true) {
|
|
228
|
+
const {
|
|
229
|
+
isEditorPartVisible
|
|
230
|
+
} = await import('vscode/service-override/views');
|
|
231
|
+
services = loadedImport.default({
|
|
232
|
+
isKeybindingConfigurationVisible: isEditorPartVisible,
|
|
233
|
+
shouldUseGlobalPicker: isEditorPartVisible
|
|
234
|
+
});
|
|
235
|
+
services = loadedImport.default();
|
|
236
|
+
} else {
|
|
237
|
+
services = loadedImport.default();
|
|
238
|
+
}
|
|
242
239
|
} else {
|
|
243
240
|
services = loadedImport.default();
|
|
244
241
|
}
|