monaco-languageclient 6.4.0 → 6.4.1-next.1
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 +6 -0
- package/lib/monaco-vscode-api-services.d.ts +13 -5
- package/lib/monaco-vscode-api-services.d.ts.map +1 -1
- package/lib/monaco-vscode-api-services.js +22 -31
- package/lib/monaco-vscode-api-services.js.map +1 -1
- package/package.json +3 -3
- package/src/monaco-vscode-api-services.ts +29 -37
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this npm module are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [6.4.1] - 2023-08-17
|
|
6
|
+
|
|
7
|
+
- `monaco-vscode-api` `1.81.1` [#523](https://github.com/TypeFox/monaco-languageclient/pull/523)
|
|
8
|
+
- Removed `enableQuickaccessService` as it is always loaded now as default
|
|
9
|
+
- Aligned naming of properties in `InitializeServiceConfig`
|
|
10
|
+
|
|
5
11
|
## [6.4.0] - 2023-08-10
|
|
6
12
|
|
|
7
13
|
- Update to `monaco-editor` `0.41.0` and `monaco-vscode-api` `1.81.0` [#520](https://github.com/TypeFox/monaco-languageclient/pull/520)
|
|
@@ -2,6 +2,7 @@ import { editor } from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
|
2
2
|
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
|
+
import { IStorageProvider } from 'vscode/service-override/storage';
|
|
5
6
|
export type InitializeServiceConfig = {
|
|
6
7
|
enableDialogService?: boolean;
|
|
7
8
|
enableNotificationService?: boolean;
|
|
@@ -9,11 +10,11 @@ export type InitializeServiceConfig = {
|
|
|
9
10
|
/**
|
|
10
11
|
* editor service is the default. If you want to use the views service, set enableViewsService to true.
|
|
11
12
|
*/
|
|
12
|
-
|
|
13
|
+
configureEditorOrViewsService?: {
|
|
13
14
|
enableViewsService?: boolean;
|
|
14
15
|
openEditorFunc?: OpenEditor;
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
+
configureConfigurationService?: {
|
|
17
18
|
defaultWorkspaceUri: string;
|
|
18
19
|
};
|
|
19
20
|
enableThemeService?: boolean;
|
|
@@ -24,15 +25,17 @@ export type InitializeServiceConfig = {
|
|
|
24
25
|
enableDebugService?: boolean;
|
|
25
26
|
enablePreferencesService?: boolean;
|
|
26
27
|
enableSnippetsService?: boolean;
|
|
27
|
-
enableQuickaccessService?: boolean;
|
|
28
28
|
enableOutputService?: boolean;
|
|
29
|
-
|
|
29
|
+
configureTerminalService?: {
|
|
30
30
|
backendImpl: SimpleTerminalBackend | ITerminalBackend;
|
|
31
31
|
};
|
|
32
32
|
enableSearchService?: boolean;
|
|
33
33
|
enableMarkersService?: boolean;
|
|
34
34
|
enableAccessibilityService?: boolean;
|
|
35
35
|
enableLanguageDetectionWorkerService?: boolean;
|
|
36
|
+
configureStorageService?: {
|
|
37
|
+
provider: IStorageProvider;
|
|
38
|
+
};
|
|
36
39
|
userServices?: editor.IEditorOverrideServices;
|
|
37
40
|
debugLogging?: boolean;
|
|
38
41
|
logLevel?: LogLevel;
|
|
@@ -43,7 +46,12 @@ export type ModuleWithDefaultExport = {
|
|
|
43
46
|
default: (x?: any) => editor.IEditorOverrideServices;
|
|
44
47
|
};
|
|
45
48
|
/**
|
|
46
|
-
*
|
|
49
|
+
* monaco-vscode-api automatically loads the following services:
|
|
50
|
+
* - layout
|
|
51
|
+
* - environment
|
|
52
|
+
* - extension
|
|
53
|
+
* - files
|
|
54
|
+
* - quickAccess
|
|
47
55
|
*/
|
|
48
56
|
export declare const importAllServices: (config?: InitializeServiceConfig) => Promise<void>;
|
|
49
57
|
//# 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;
|
|
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;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAMnE,MAAM,MAAM,uBAAuB,GAAG;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,6BAA6B,CAAC,EAAE;QAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,cAAc,CAAC,EAAE,UAAU,CAAA;KAC9B,CAAC;IACF,6BAA6B,CAAC,EAAE;QAC5B,mBAAmB,EAAE,MAAM,CAAC;KAC/B,CAAC;IACF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,wBAAwB,CAAC,EAAE;QACvB,WAAW,EAAE,qBAAqB,GAAG,gBAAgB,CAAA;KACxD,CAAA;IACD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,oCAAoC,CAAC,EAAE,OAAO,CAAC;IAC/C,uBAAuB,CAAC,EAAE;QACtB,QAAQ,EAAE,gBAAgB,CAAA;KAC7B,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC,uBAAuB,CAAC;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,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;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,YAAmB,uBAAuB,kBAiKvE,CAAC"}
|
|
@@ -27,7 +27,12 @@ export const initServices = async (config) => {
|
|
|
27
27
|
window.MonacoEnvironment.vscodeApiInitialised = true;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* monaco-vscode-api automatically loads the following services:
|
|
31
|
+
* - layout
|
|
32
|
+
* - environment
|
|
33
|
+
* - extension
|
|
34
|
+
* - files
|
|
35
|
+
* - quickAccess
|
|
31
36
|
*/
|
|
32
37
|
export const importAllServices = async (config) => {
|
|
33
38
|
const serviceNames = [];
|
|
@@ -41,15 +46,15 @@ export const importAllServices = async (config) => {
|
|
|
41
46
|
if (lc.enableModelService === true) {
|
|
42
47
|
addService('model', import('vscode/service-override/model'));
|
|
43
48
|
}
|
|
44
|
-
if (lc.
|
|
45
|
-
if (lc.
|
|
49
|
+
if (lc.configureEditorOrViewsService !== undefined) {
|
|
50
|
+
if (lc.configureEditorOrViewsService.enableViewsService === true) {
|
|
46
51
|
addService('views', import('vscode/service-override/views'));
|
|
47
52
|
}
|
|
48
53
|
else {
|
|
49
54
|
addService('editor', import('vscode/service-override/editor'));
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
|
-
if (lc.
|
|
57
|
+
if (lc.configureConfigurationService !== undefined) {
|
|
53
58
|
addService('configuration', import('vscode/service-override/configuration'));
|
|
54
59
|
}
|
|
55
60
|
if (lc.enableDialogService === true) {
|
|
@@ -82,13 +87,10 @@ export const importAllServices = async (config) => {
|
|
|
82
87
|
if (lc.enableSnippetsService === true) {
|
|
83
88
|
addService('snippets', import('vscode/service-override/snippets'));
|
|
84
89
|
}
|
|
85
|
-
if (lc.enableQuickaccessService === true) {
|
|
86
|
-
addService('quickaccess', import('vscode/service-override/quickaccess'));
|
|
87
|
-
}
|
|
88
90
|
if (lc.enableOutputService === true) {
|
|
89
91
|
addService('output', import('vscode/service-override/output'));
|
|
90
92
|
}
|
|
91
|
-
if (lc.
|
|
93
|
+
if (lc.configureTerminalService !== undefined) {
|
|
92
94
|
addService('terminal', import('vscode/service-override/terminal'));
|
|
93
95
|
}
|
|
94
96
|
if (lc.enableSearchService === true) {
|
|
@@ -103,6 +105,9 @@ export const importAllServices = async (config) => {
|
|
|
103
105
|
if (lc.enableLanguageDetectionWorkerService === true) {
|
|
104
106
|
addService('languageDetectionWorker', import('vscode/service-override/languageDetectionWorker'));
|
|
105
107
|
}
|
|
108
|
+
if (lc.enableLanguageDetectionWorkerService === true) {
|
|
109
|
+
addService('languageDetectionWorker', import('vscode/service-override/languageDetectionWorker'));
|
|
110
|
+
}
|
|
106
111
|
const reportServiceLoading = (services, debugLogging, origin) => {
|
|
107
112
|
for (const serviceName of Object.keys(services)) {
|
|
108
113
|
if (debugLogging) {
|
|
@@ -129,18 +134,12 @@ export const importAllServices = async (config) => {
|
|
|
129
134
|
}
|
|
130
135
|
const haveThemeService = serviceNames.includes('theme') || Object.keys(overrideServices).includes('themeService');
|
|
131
136
|
const haveTextmateService = serviceNames.includes('textmate') || Object.keys(overrideServices).includes('textMateTokenizationFeature');
|
|
132
|
-
const haveQuickaccessService = serviceNames.includes('quickaccess') || Object.keys(overrideServices).includes('quickInputService');
|
|
133
|
-
const haveKeybindingsService = serviceNames.includes('keybindings') || Object.keys(overrideServices).includes('keybindingService');
|
|
134
137
|
const haveMarkersService = serviceNames.includes('markers');
|
|
135
138
|
const haveViewsService = serviceNames.includes('views') || Object.keys(overrideServices).includes('viewsService');
|
|
136
139
|
// theme requires textmate
|
|
137
140
|
if (haveThemeService && !haveTextmateService) {
|
|
138
141
|
throw new Error('"theme" requires "textmate" service. Please add it to the "initServices" config.');
|
|
139
142
|
}
|
|
140
|
-
// quickaccess requires keybindings
|
|
141
|
-
if (haveQuickaccessService && !haveKeybindingsService) {
|
|
142
|
-
throw new Error('"quickaccess" requires "keybindings" service. Please add it to the "initServices" config.');
|
|
143
|
-
}
|
|
144
143
|
// markers service requires views service
|
|
145
144
|
if (haveMarkersService && !haveViewsService) {
|
|
146
145
|
throw new Error('"markers" requires "views" service. Please add it to the "initServices" config.');
|
|
@@ -152,8 +151,8 @@ export const importAllServices = async (config) => {
|
|
|
152
151
|
}
|
|
153
152
|
let services = {};
|
|
154
153
|
if (serviceName === 'editor' || serviceName === 'views') {
|
|
155
|
-
if (lc.
|
|
156
|
-
services = loadedImport.default(lc.
|
|
154
|
+
if (lc.configureEditorOrViewsService?.openEditorFunc) {
|
|
155
|
+
services = loadedImport.default(lc.configureEditorOrViewsService.openEditorFunc);
|
|
157
156
|
}
|
|
158
157
|
else {
|
|
159
158
|
const defaultOpenEditorFunc = async (model, options, sideBySide) => {
|
|
@@ -164,27 +163,19 @@ export const importAllServices = async (config) => {
|
|
|
164
163
|
}
|
|
165
164
|
}
|
|
166
165
|
else if (serviceName === 'configuration') {
|
|
167
|
-
if (lc.
|
|
168
|
-
const uri = Uri.file(lc.
|
|
166
|
+
if (lc.configureConfigurationService?.defaultWorkspaceUri) {
|
|
167
|
+
const uri = Uri.file(lc.configureConfigurationService.defaultWorkspaceUri);
|
|
169
168
|
services = loadedImport.default(uri);
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
else if (serviceName === 'terminal') {
|
|
173
|
-
if (lc.
|
|
174
|
-
services = loadedImport.default(lc.
|
|
172
|
+
if (lc.configureTerminalService?.backendImpl) {
|
|
173
|
+
services = loadedImport.default(lc.configureTerminalService.backendImpl);
|
|
175
174
|
}
|
|
176
175
|
}
|
|
177
|
-
else if (serviceName === '
|
|
178
|
-
if (lc.
|
|
179
|
-
|
|
180
|
-
services = loadedImport.default({
|
|
181
|
-
isKeybindingConfigurationVisible: isEditorPartVisible,
|
|
182
|
-
shouldUseGlobalPicker: isEditorPartVisible
|
|
183
|
-
});
|
|
184
|
-
services = loadedImport.default();
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
services = loadedImport.default();
|
|
176
|
+
else if (serviceName === 'storage') {
|
|
177
|
+
if (lc.configureStorageService?.provider) {
|
|
178
|
+
services = loadedImport.default(lc.configureStorageService.provider);
|
|
188
179
|
}
|
|
189
180
|
}
|
|
190
181
|
else {
|
|
@@ -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,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AgB,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.4.
|
|
3
|
+
"version": "6.4.1-next.1",
|
|
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.41.0",
|
|
52
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.81.
|
|
52
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.81.1",
|
|
53
53
|
"vscode-jsonrpc": "~8.1.0",
|
|
54
54
|
"vscode-languageclient": "~8.1.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"monaco-editor": "~0.41.0",
|
|
58
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.81.
|
|
58
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.81.1"
|
|
59
59
|
},
|
|
60
60
|
"peerDependenciesMeta": {
|
|
61
61
|
"monaco-editor": {
|
|
@@ -8,6 +8,7 @@ import { ILogService, initialize as initializeMonacoService, LogLevel, Standalon
|
|
|
8
8
|
import { initialize as initializeVscodeExtensions } from 'vscode/extensions';
|
|
9
9
|
import type { OpenEditor } from 'vscode/service-override/editor';
|
|
10
10
|
import { ITerminalBackend, SimpleTerminalBackend } from 'vscode/service-override/terminal';
|
|
11
|
+
import { IStorageProvider } from 'vscode/service-override/storage';
|
|
11
12
|
|
|
12
13
|
interface MonacoEnvironmentEnhanced extends Environment {
|
|
13
14
|
vscodeApiInitialised: boolean;
|
|
@@ -20,11 +21,11 @@ export type InitializeServiceConfig = {
|
|
|
20
21
|
/**
|
|
21
22
|
* editor service is the default. If you want to use the views service, set enableViewsService to true.
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
configureEditorOrViewsService?: {
|
|
24
25
|
enableViewsService?: boolean;
|
|
25
26
|
openEditorFunc?: OpenEditor
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
configureConfigurationService?: {
|
|
28
29
|
defaultWorkspaceUri: string;
|
|
29
30
|
};
|
|
30
31
|
enableThemeService?: boolean;
|
|
@@ -35,15 +36,17 @@ export type InitializeServiceConfig = {
|
|
|
35
36
|
enableDebugService?: boolean;
|
|
36
37
|
enablePreferencesService?: boolean;
|
|
37
38
|
enableSnippetsService?: boolean;
|
|
38
|
-
enableQuickaccessService?: boolean;
|
|
39
39
|
enableOutputService?: boolean;
|
|
40
|
-
|
|
40
|
+
configureTerminalService?: {
|
|
41
41
|
backendImpl: SimpleTerminalBackend | ITerminalBackend
|
|
42
42
|
}
|
|
43
43
|
enableSearchService?: boolean;
|
|
44
44
|
enableMarkersService?: boolean;
|
|
45
45
|
enableAccessibilityService?: boolean;
|
|
46
46
|
enableLanguageDetectionWorkerService?: boolean;
|
|
47
|
+
configureStorageService?: {
|
|
48
|
+
provider: IStorageProvider
|
|
49
|
+
},
|
|
47
50
|
userServices?: editor.IEditorOverrideServices;
|
|
48
51
|
debugLogging?: boolean;
|
|
49
52
|
logLevel?: LogLevel
|
|
@@ -78,7 +81,12 @@ export type ModuleWithDefaultExport = {
|
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
/**
|
|
81
|
-
*
|
|
84
|
+
* monaco-vscode-api automatically loads the following services:
|
|
85
|
+
* - layout
|
|
86
|
+
* - environment
|
|
87
|
+
* - extension
|
|
88
|
+
* - files
|
|
89
|
+
* - quickAccess
|
|
82
90
|
*/
|
|
83
91
|
export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
84
92
|
const serviceNames: string[] = [];
|
|
@@ -94,14 +102,14 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
94
102
|
if (lc.enableModelService === true) {
|
|
95
103
|
addService('model', import('vscode/service-override/model'));
|
|
96
104
|
}
|
|
97
|
-
if (lc.
|
|
98
|
-
if (lc.
|
|
105
|
+
if (lc.configureEditorOrViewsService !== undefined) {
|
|
106
|
+
if (lc.configureEditorOrViewsService.enableViewsService === true) {
|
|
99
107
|
addService('views', import('vscode/service-override/views'));
|
|
100
108
|
} else {
|
|
101
109
|
addService('editor', import('vscode/service-override/editor'));
|
|
102
110
|
}
|
|
103
111
|
}
|
|
104
|
-
if (lc.
|
|
112
|
+
if (lc.configureConfigurationService !== undefined) {
|
|
105
113
|
addService('configuration', import('vscode/service-override/configuration'));
|
|
106
114
|
}
|
|
107
115
|
if (lc.enableDialogService === true) {
|
|
@@ -134,13 +142,10 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
134
142
|
if (lc.enableSnippetsService === true) {
|
|
135
143
|
addService('snippets', import('vscode/service-override/snippets'));
|
|
136
144
|
}
|
|
137
|
-
if (lc.enableQuickaccessService === true) {
|
|
138
|
-
addService('quickaccess', import('vscode/service-override/quickaccess'));
|
|
139
|
-
}
|
|
140
145
|
if (lc.enableOutputService === true) {
|
|
141
146
|
addService('output', import('vscode/service-override/output'));
|
|
142
147
|
}
|
|
143
|
-
if (lc.
|
|
148
|
+
if (lc.configureTerminalService !== undefined) {
|
|
144
149
|
addService('terminal', import('vscode/service-override/terminal'));
|
|
145
150
|
}
|
|
146
151
|
if (lc.enableSearchService === true) {
|
|
@@ -155,6 +160,9 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
155
160
|
if (lc.enableLanguageDetectionWorkerService === true) {
|
|
156
161
|
addService('languageDetectionWorker', import('vscode/service-override/languageDetectionWorker'));
|
|
157
162
|
}
|
|
163
|
+
if (lc.enableLanguageDetectionWorkerService === true) {
|
|
164
|
+
addService('languageDetectionWorker', import('vscode/service-override/languageDetectionWorker'));
|
|
165
|
+
}
|
|
158
166
|
|
|
159
167
|
const reportServiceLoading = (services: editor.IEditorOverrideServices, debugLogging: boolean, origin?: string) => {
|
|
160
168
|
for (const serviceName of Object.keys(services)) {
|
|
@@ -184,8 +192,6 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
184
192
|
|
|
185
193
|
const haveThemeService = serviceNames.includes('theme') || Object.keys(overrideServices).includes('themeService');
|
|
186
194
|
const haveTextmateService = serviceNames.includes('textmate') || Object.keys(overrideServices).includes('textMateTokenizationFeature');
|
|
187
|
-
const haveQuickaccessService = serviceNames.includes('quickaccess') || Object.keys(overrideServices).includes('quickInputService');
|
|
188
|
-
const haveKeybindingsService = serviceNames.includes('keybindings') || Object.keys(overrideServices).includes('keybindingService');
|
|
189
195
|
const haveMarkersService = serviceNames.includes('markers');
|
|
190
196
|
const haveViewsService = serviceNames.includes('views') || Object.keys(overrideServices).includes('viewsService');
|
|
191
197
|
|
|
@@ -194,11 +200,6 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
194
200
|
throw new Error('"theme" requires "textmate" service. Please add it to the "initServices" config.');
|
|
195
201
|
}
|
|
196
202
|
|
|
197
|
-
// quickaccess requires keybindings
|
|
198
|
-
if (haveQuickaccessService && !haveKeybindingsService) {
|
|
199
|
-
throw new Error('"quickaccess" requires "keybindings" service. Please add it to the "initServices" config.');
|
|
200
|
-
}
|
|
201
|
-
|
|
202
203
|
// markers service requires views service
|
|
203
204
|
if (haveMarkersService && !haveViewsService) {
|
|
204
205
|
throw new Error('"markers" requires "views" service. Please add it to the "initServices" config.');
|
|
@@ -212,8 +213,8 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
212
213
|
|
|
213
214
|
let services: editor.IEditorOverrideServices = {};
|
|
214
215
|
if (serviceName === 'editor' || serviceName === 'views') {
|
|
215
|
-
if (lc.
|
|
216
|
-
services = loadedImport.default(lc.
|
|
216
|
+
if (lc.configureEditorOrViewsService?.openEditorFunc) {
|
|
217
|
+
services = loadedImport.default(lc.configureEditorOrViewsService.openEditorFunc);
|
|
217
218
|
} else {
|
|
218
219
|
const defaultOpenEditorFunc: OpenEditor = async (model, options, sideBySide) => {
|
|
219
220
|
console.log('Trying to open a model', model, options, sideBySide);
|
|
@@ -222,26 +223,17 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
222
223
|
services = loadedImport.default(defaultOpenEditorFunc);
|
|
223
224
|
}
|
|
224
225
|
} else if (serviceName === 'configuration') {
|
|
225
|
-
if (lc.
|
|
226
|
-
const uri = Uri.file(lc.
|
|
226
|
+
if (lc.configureConfigurationService?.defaultWorkspaceUri) {
|
|
227
|
+
const uri = Uri.file(lc.configureConfigurationService!.defaultWorkspaceUri);
|
|
227
228
|
services = loadedImport.default(uri);
|
|
228
229
|
}
|
|
229
230
|
} else if (serviceName === 'terminal') {
|
|
230
|
-
if (lc.
|
|
231
|
-
services = loadedImport.default(lc.
|
|
231
|
+
if (lc.configureTerminalService?.backendImpl) {
|
|
232
|
+
services = loadedImport.default(lc.configureTerminalService.backendImpl);
|
|
232
233
|
}
|
|
233
|
-
} else if (serviceName === '
|
|
234
|
-
if (lc.
|
|
235
|
-
|
|
236
|
-
isEditorPartVisible
|
|
237
|
-
} = await import('vscode/service-override/views');
|
|
238
|
-
services = loadedImport.default({
|
|
239
|
-
isKeybindingConfigurationVisible: isEditorPartVisible,
|
|
240
|
-
shouldUseGlobalPicker: isEditorPartVisible
|
|
241
|
-
});
|
|
242
|
-
services = loadedImport.default();
|
|
243
|
-
} else {
|
|
244
|
-
services = loadedImport.default();
|
|
234
|
+
} else if (serviceName === 'storage') {
|
|
235
|
+
if (lc.configureStorageService?.provider) {
|
|
236
|
+
services = loadedImport.default(lc.configureStorageService.provider);
|
|
245
237
|
}
|
|
246
238
|
} else {
|
|
247
239
|
services = loadedImport.default();
|