monaco-languageclient 10.0.0-next.0 → 10.0.0-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 +15 -3
- package/lib/common/utils.d.ts +1 -1
- package/lib/common/utils.d.ts.map +1 -1
- package/lib/common/utils.js +1 -1
- package/lib/common/utils.js.map +1 -1
- package/lib/editorApp/config.js +1 -1
- package/lib/editorApp/editorApp.d.ts +4 -10
- package/lib/editorApp/editorApp.d.ts.map +1 -1
- package/lib/editorApp/editorApp.js +76 -86
- package/lib/editorApp/editorApp.js.map +1 -1
- package/lib/fs/definitions.d.ts +2 -2
- package/lib/fs/definitions.d.ts.map +1 -1
- package/lib/vscode/apiWrapper.d.ts +5 -2
- package/lib/vscode/apiWrapper.d.ts.map +1 -1
- package/lib/vscode/apiWrapper.js +23 -14
- package/lib/vscode/apiWrapper.js.map +1 -1
- package/lib/vscode/config.js +1 -1
- package/lib/vscode/utils.js +1 -1
- package/lib/worker/index.js +1 -1
- package/lib/wrapper/lcconfig.js +1 -1
- package/lib/wrapper/lcmanager.js +1 -1
- package/lib/wrapper/lcwrapper.js +1 -1
- package/lib/wrapper/lcwrapper.js.map +1 -1
- package/package.json +39 -38
- package/src/common/utils.ts +1 -1
- package/src/editorApp/config.ts +1 -1
- package/src/editorApp/editorApp.ts +83 -93
- package/src/fs/definitions.ts +2 -2
- package/src/vscode/apiWrapper.ts +24 -16
- package/src/vscode/config.ts +1 -1
- package/src/vscode/utils.ts +1 -1
- package/src/worker/index.ts +1 -1
- package/src/wrapper/lcconfig.ts +1 -1
- package/src/wrapper/lcmanager.ts +1 -1
- package/src/wrapper/lcwrapper.ts +1 -1
package/src/vscode/apiWrapper.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025 TypeFox and others.
|
|
3
3
|
* Licensed under the MIT License. See LICENSE in the package root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
|
|
@@ -10,11 +10,11 @@ import getConfigurationServiceOverride, { initUserConfiguration } from '@codinga
|
|
|
10
10
|
import getLanguagesServiceOverride from '@codingame/monaco-vscode-languages-service-override';
|
|
11
11
|
import getLogServiceOverride from '@codingame/monaco-vscode-log-service-override';
|
|
12
12
|
import getModelServiceOverride from '@codingame/monaco-vscode-model-service-override';
|
|
13
|
-
import { ConsoleLogger,
|
|
13
|
+
import { ConsoleLogger, encodeStringOrUrlToDataUrl, type Logger } from 'monaco-languageclient/common';
|
|
14
14
|
import { useWorkerFactory } from 'monaco-languageclient/workerFactory';
|
|
15
15
|
import * as vscode from 'vscode';
|
|
16
16
|
import 'vscode/localExtensionHost';
|
|
17
|
-
import type { MonacoVscodeApiConfig } from './config.js';
|
|
17
|
+
import type { ExtensionConfig, MonacoVscodeApiConfig } from './config.js';
|
|
18
18
|
import { configureExtHostWorker, getEnhancedMonacoEnvironment, mergeServices, reportServiceLoading, useOpenEditorStub } from './utils.js';
|
|
19
19
|
|
|
20
20
|
export interface InitServicesInstructions {
|
|
@@ -128,13 +128,13 @@ export class MonacoVscodeApiWrapper {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Set the log-level via the development settings.
|
|
132
|
+
* VSCode developmentOptions are read-only. There are no functions exposed to set options directly.
|
|
133
|
+
* Therefore the Object properties need to be manipulated directly via Object.assign.
|
|
132
134
|
*/
|
|
133
135
|
protected configureDevLogLevel() {
|
|
134
136
|
const devLogLevel = this.apiConfig.workspaceConfig?.developmentOptions?.logLevel;
|
|
135
137
|
if (devLogLevel === undefined) {
|
|
136
|
-
|
|
137
|
-
// this needs to be done so complicated, because developmentOptions is read-only
|
|
138
138
|
const devOptions: Record<string, unknown> = {
|
|
139
139
|
...this.apiConfig.workspaceConfig!.developmentOptions
|
|
140
140
|
};
|
|
@@ -242,21 +242,29 @@ export class MonacoVscodeApiWrapper {
|
|
|
242
242
|
});
|
|
243
243
|
for (const extensionConfig of extensions ?? []) {
|
|
244
244
|
if (!extensionIds.includes(`${extensionConfig.config.publisher}.${extensionConfig.config.name}`)) {
|
|
245
|
-
|
|
246
|
-
const extRegResult = registerExtension(manifest, ExtensionHostKind.LocalProcess);
|
|
247
|
-
this.extensionRegisterResults.set(manifest.name, extRegResult);
|
|
248
|
-
if (extensionConfig.filesOrContents && Object.hasOwn(extRegResult, 'registerFileUrl')) {
|
|
249
|
-
for (const entry of extensionConfig.filesOrContents) {
|
|
250
|
-
this.disposableStore.add(extRegResult.registerFileUrl(entry[0], verifyUrlOrCreateDataUrl(entry[1])));
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
allPromises.push(extRegResult.whenReady());
|
|
245
|
+
allPromises.push(this.initExtension(extensionConfig, extensionIds));
|
|
254
246
|
}
|
|
255
247
|
}
|
|
256
248
|
await Promise.all(allPromises);
|
|
257
249
|
}
|
|
258
250
|
}
|
|
259
251
|
|
|
252
|
+
protected initExtension(extensionConfig: ExtensionConfig, extensionIds: string[]): Promise<void> {
|
|
253
|
+
if (!extensionIds.includes(`${extensionConfig.config.publisher}.${extensionConfig.config.name}`)) {
|
|
254
|
+
const manifest = extensionConfig.config as IExtensionManifest;
|
|
255
|
+
const extRegResult = registerExtension(manifest, ExtensionHostKind.LocalProcess);
|
|
256
|
+
this.extensionRegisterResults.set(manifest.name, extRegResult);
|
|
257
|
+
if (extensionConfig.filesOrContents && Object.hasOwn(extRegResult, 'registerFileUrl')) {
|
|
258
|
+
for (const entry of extensionConfig.filesOrContents) {
|
|
259
|
+
this.disposableStore.add(extRegResult.registerFileUrl(entry[0], encodeStringOrUrlToDataUrl(entry[1])));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
return extRegResult.whenReady();
|
|
263
|
+
} else {
|
|
264
|
+
return Promise.resolve();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
260
268
|
protected markGlobalInit() {
|
|
261
269
|
this.logger.debug('markGlobalInit');
|
|
262
270
|
|
|
@@ -304,7 +312,7 @@ export class MonacoVscodeApiWrapper {
|
|
|
304
312
|
// ensure one of the three potential view services are configured
|
|
305
313
|
await this.configureViewsServices();
|
|
306
314
|
|
|
307
|
-
//
|
|
315
|
+
// enforce semantic highlighting if configured
|
|
308
316
|
this.configureSemanticHighlighting();
|
|
309
317
|
|
|
310
318
|
await this.initUserConfiguration();
|
package/src/vscode/config.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025 TypeFox and others.
|
|
3
3
|
* Licensed under the MIT License. See LICENSE in the package root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
|
package/src/vscode/utils.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025 TypeFox and others.
|
|
3
3
|
* Licensed under the MIT License. See LICENSE in the package root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
|
package/src/worker/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025 TypeFox and others.
|
|
3
3
|
* Licensed under the MIT License. See LICENSE in the package root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
|
package/src/wrapper/lcconfig.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025 TypeFox and others.
|
|
3
3
|
* Licensed under the MIT License. See LICENSE in the package root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
|
package/src/wrapper/lcmanager.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* --------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c)
|
|
2
|
+
* Copyright (c) 2025 TypeFox and others.
|
|
3
3
|
* Licensed under the MIT License. See LICENSE in the package root for license information.
|
|
4
4
|
* ------------------------------------------------------------------------------------------ */
|
|
5
5
|
|
package/src/wrapper/lcwrapper.ts
CHANGED
|
@@ -232,7 +232,7 @@ export class LanguageClientWrapper {
|
|
|
232
232
|
} finally {
|
|
233
233
|
retry++;
|
|
234
234
|
if (retry > (restartOptions.retries) && !this.isStarted()) {
|
|
235
|
-
this.logger?.info(
|
|
235
|
+
this.logger?.info(`Disabling Language Client. Failed to start clangd after ${restartOptions.retries} retries`);
|
|
236
236
|
} else {
|
|
237
237
|
setTimeout(async () => {
|
|
238
238
|
await this.restart(this.worker, restartOptions.keepWorker);
|