monaco-languageclient 6.4.0 → 6.4.1-next.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 +4 -0
- package/lib/monaco-vscode-api-services.d.ts +6 -2
- package/lib/monaco-vscode-api-services.d.ts.map +1 -1
- package/lib/monaco-vscode-api-services.js +16 -8
- package/lib/monaco-vscode-api-services.js.map +1 -1
- package/package.json +4 -4
- package/src/monaco-vscode-api-services.ts +21 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this npm module are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [6.4.1] - 2023-08-1x
|
|
6
|
+
|
|
7
|
+
- `monaco-vscode-api` `1.81.1` [#523](https://github.com/TypeFox/monaco-languageclient/pull/523)
|
|
8
|
+
|
|
5
9
|
## [6.4.0] - 2023-08-10
|
|
6
10
|
|
|
7
11
|
- 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;
|
|
@@ -33,6 +34,9 @@ export type InitializeServiceConfig = {
|
|
|
33
34
|
enableMarkersService?: boolean;
|
|
34
35
|
enableAccessibilityService?: boolean;
|
|
35
36
|
enableLanguageDetectionWorkerService?: boolean;
|
|
37
|
+
configureStorateService?: {
|
|
38
|
+
provider: IStorageProvider;
|
|
39
|
+
};
|
|
36
40
|
userServices?: editor.IEditorOverrideServices;
|
|
37
41
|
debugLogging?: boolean;
|
|
38
42
|
logLevel?: LogLevel;
|
|
@@ -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,CAA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AAM,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,kBAwLvE,CAAC"}
|
|
@@ -41,15 +41,15 @@ export const importAllServices = async (config) => {
|
|
|
41
41
|
if (lc.enableModelService === true) {
|
|
42
42
|
addService('model', import('vscode/service-override/model'));
|
|
43
43
|
}
|
|
44
|
-
if (lc.
|
|
45
|
-
if (lc.
|
|
44
|
+
if (lc.configureEditorOrViewsService !== undefined) {
|
|
45
|
+
if (lc.configureEditorOrViewsService.enableViewsService === true) {
|
|
46
46
|
addService('views', import('vscode/service-override/views'));
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
49
|
addService('editor', import('vscode/service-override/editor'));
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
if (lc.
|
|
52
|
+
if (lc.configureConfigurationService !== undefined) {
|
|
53
53
|
addService('configuration', import('vscode/service-override/configuration'));
|
|
54
54
|
}
|
|
55
55
|
if (lc.enableDialogService === true) {
|
|
@@ -103,6 +103,9 @@ export const importAllServices = async (config) => {
|
|
|
103
103
|
if (lc.enableLanguageDetectionWorkerService === true) {
|
|
104
104
|
addService('languageDetectionWorker', import('vscode/service-override/languageDetectionWorker'));
|
|
105
105
|
}
|
|
106
|
+
if (lc.enableLanguageDetectionWorkerService === true) {
|
|
107
|
+
addService('languageDetectionWorker', import('vscode/service-override/languageDetectionWorker'));
|
|
108
|
+
}
|
|
106
109
|
const reportServiceLoading = (services, debugLogging, origin) => {
|
|
107
110
|
for (const serviceName of Object.keys(services)) {
|
|
108
111
|
if (debugLogging) {
|
|
@@ -152,8 +155,8 @@ export const importAllServices = async (config) => {
|
|
|
152
155
|
}
|
|
153
156
|
let services = {};
|
|
154
157
|
if (serviceName === 'editor' || serviceName === 'views') {
|
|
155
|
-
if (lc.
|
|
156
|
-
services = loadedImport.default(lc.
|
|
158
|
+
if (lc.configureEditorOrViewsService?.openEditorFunc) {
|
|
159
|
+
services = loadedImport.default(lc.configureEditorOrViewsService.openEditorFunc);
|
|
157
160
|
}
|
|
158
161
|
else {
|
|
159
162
|
const defaultOpenEditorFunc = async (model, options, sideBySide) => {
|
|
@@ -164,8 +167,8 @@ export const importAllServices = async (config) => {
|
|
|
164
167
|
}
|
|
165
168
|
}
|
|
166
169
|
else if (serviceName === 'configuration') {
|
|
167
|
-
if (lc.
|
|
168
|
-
const uri = Uri.file(lc.
|
|
170
|
+
if (lc.configureConfigurationService?.defaultWorkspaceUri) {
|
|
171
|
+
const uri = Uri.file(lc.configureConfigurationService.defaultWorkspaceUri);
|
|
169
172
|
services = loadedImport.default(uri);
|
|
170
173
|
}
|
|
171
174
|
}
|
|
@@ -175,7 +178,7 @@ export const importAllServices = async (config) => {
|
|
|
175
178
|
}
|
|
176
179
|
}
|
|
177
180
|
else if (serviceName === 'quickaccess') {
|
|
178
|
-
if (lc.
|
|
181
|
+
if (lc.configureEditorOrViewsService?.enableViewsService === true) {
|
|
179
182
|
const { isEditorPartVisible } = await import('vscode/service-override/views');
|
|
180
183
|
services = loadedImport.default({
|
|
181
184
|
isKeybindingConfigurationVisible: isEditorPartVisible,
|
|
@@ -187,6 +190,11 @@ export const importAllServices = async (config) => {
|
|
|
187
190
|
services = loadedImport.default();
|
|
188
191
|
}
|
|
189
192
|
}
|
|
193
|
+
else if (serviceName === 'storage') {
|
|
194
|
+
if (lc.configureStorateService?.provider) {
|
|
195
|
+
services = loadedImport.default(lc.configureStorateService.provider);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
190
198
|
else {
|
|
191
199
|
services = loadedImport.default();
|
|
192
200
|
}
|
|
@@ -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,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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.0",
|
|
3
|
+
"version": "6.4.1-next.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.41.0",
|
|
52
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.81.0",
|
|
52
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.81.1-next.0",
|
|
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.0"
|
|
58
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.81.1-next.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependenciesMeta": {
|
|
61
61
|
"monaco-editor": {
|
|
@@ -72,4 +72,4 @@
|
|
|
72
72
|
"build:msg": "echo Building monaco-languageclient:",
|
|
73
73
|
"build": "npm run build:msg && npm run clean && npm run compile"
|
|
74
74
|
}
|
|
75
|
-
}
|
|
75
|
+
}
|
|
@@ -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;
|
|
@@ -44,6 +45,9 @@ export type InitializeServiceConfig = {
|
|
|
44
45
|
enableMarkersService?: boolean;
|
|
45
46
|
enableAccessibilityService?: boolean;
|
|
46
47
|
enableLanguageDetectionWorkerService?: boolean;
|
|
48
|
+
configureStorateService?: {
|
|
49
|
+
provider: IStorageProvider
|
|
50
|
+
},
|
|
47
51
|
userServices?: editor.IEditorOverrideServices;
|
|
48
52
|
debugLogging?: boolean;
|
|
49
53
|
logLevel?: LogLevel
|
|
@@ -94,14 +98,14 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
94
98
|
if (lc.enableModelService === true) {
|
|
95
99
|
addService('model', import('vscode/service-override/model'));
|
|
96
100
|
}
|
|
97
|
-
if (lc.
|
|
98
|
-
if (lc.
|
|
101
|
+
if (lc.configureEditorOrViewsService !== undefined) {
|
|
102
|
+
if (lc.configureEditorOrViewsService.enableViewsService === true) {
|
|
99
103
|
addService('views', import('vscode/service-override/views'));
|
|
100
104
|
} else {
|
|
101
105
|
addService('editor', import('vscode/service-override/editor'));
|
|
102
106
|
}
|
|
103
107
|
}
|
|
104
|
-
if (lc.
|
|
108
|
+
if (lc.configureConfigurationService !== undefined) {
|
|
105
109
|
addService('configuration', import('vscode/service-override/configuration'));
|
|
106
110
|
}
|
|
107
111
|
if (lc.enableDialogService === true) {
|
|
@@ -155,6 +159,9 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
155
159
|
if (lc.enableLanguageDetectionWorkerService === true) {
|
|
156
160
|
addService('languageDetectionWorker', import('vscode/service-override/languageDetectionWorker'));
|
|
157
161
|
}
|
|
162
|
+
if (lc.enableLanguageDetectionWorkerService === true) {
|
|
163
|
+
addService('languageDetectionWorker', import('vscode/service-override/languageDetectionWorker'));
|
|
164
|
+
}
|
|
158
165
|
|
|
159
166
|
const reportServiceLoading = (services: editor.IEditorOverrideServices, debugLogging: boolean, origin?: string) => {
|
|
160
167
|
for (const serviceName of Object.keys(services)) {
|
|
@@ -212,8 +219,8 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
212
219
|
|
|
213
220
|
let services: editor.IEditorOverrideServices = {};
|
|
214
221
|
if (serviceName === 'editor' || serviceName === 'views') {
|
|
215
|
-
if (lc.
|
|
216
|
-
services = loadedImport.default(lc.
|
|
222
|
+
if (lc.configureEditorOrViewsService?.openEditorFunc) {
|
|
223
|
+
services = loadedImport.default(lc.configureEditorOrViewsService.openEditorFunc);
|
|
217
224
|
} else {
|
|
218
225
|
const defaultOpenEditorFunc: OpenEditor = async (model, options, sideBySide) => {
|
|
219
226
|
console.log('Trying to open a model', model, options, sideBySide);
|
|
@@ -222,8 +229,8 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
222
229
|
services = loadedImport.default(defaultOpenEditorFunc);
|
|
223
230
|
}
|
|
224
231
|
} else if (serviceName === 'configuration') {
|
|
225
|
-
if (lc.
|
|
226
|
-
const uri = Uri.file(lc.
|
|
232
|
+
if (lc.configureConfigurationService?.defaultWorkspaceUri) {
|
|
233
|
+
const uri = Uri.file(lc.configureConfigurationService!.defaultWorkspaceUri);
|
|
227
234
|
services = loadedImport.default(uri);
|
|
228
235
|
}
|
|
229
236
|
} else if (serviceName === 'terminal') {
|
|
@@ -231,7 +238,7 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
231
238
|
services = loadedImport.default(lc.configureTerminalServiceConfig.backendImpl);
|
|
232
239
|
}
|
|
233
240
|
} else if (serviceName === 'quickaccess') {
|
|
234
|
-
if (lc.
|
|
241
|
+
if (lc.configureEditorOrViewsService?.enableViewsService === true) {
|
|
235
242
|
const {
|
|
236
243
|
isEditorPartVisible
|
|
237
244
|
} = await import('vscode/service-override/views');
|
|
@@ -243,6 +250,10 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
|
|
|
243
250
|
} else {
|
|
244
251
|
services = loadedImport.default();
|
|
245
252
|
}
|
|
253
|
+
} else if (serviceName === 'storage') {
|
|
254
|
+
if (lc.configureStorateService?.provider) {
|
|
255
|
+
services = loadedImport.default(lc.configureStorateService.provider);
|
|
256
|
+
}
|
|
246
257
|
} else {
|
|
247
258
|
services = loadedImport.default();
|
|
248
259
|
}
|