From 5d6b8743cce738e564ab02fc27cf61fc39c4d399 Mon Sep 17 00:00:00 2001 From: Ives van Hoorne Date: Thu, 9 Nov 2023 01:44:34 +0100 Subject: [PATCH] fix: initialize editor features after participants have been run --- scripts/vscode.patch | 32 +++++++++++++++++++++++++++++--- src/monaco.ts | 1 + 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/scripts/vscode.patch b/scripts/vscode.patch index 6ef2c123..37fdfdd9 100644 --- a/scripts/vscode.patch +++ b/scripts/vscode.patch @@ -319,10 +319,19 @@ index 23d547570e9..31dfb4fd8d4 100644 export * from 'vs/editor/editor.api'; diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts -index 01f2c6987ac..5d6abf9d561 100644 +index 01f2c6987ac..fcd285d22b5 100644 --- a/src/vs/editor/standalone/browser/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts -@@ -517,10 +517,14 @@ export class StandaloneKeybindingService extends AbstractKeybindingService { +@@ -89,8 +89,6 @@ import { DefaultConfiguration } from 'vs/platform/configuration/common/configura + import { WorkspaceEdit } from 'vs/editor/common/languages'; + import { AudioCue, IAudioCueService, Sound } from 'vs/platform/audioCues/browser/audioCueService'; + import { LogService } from 'vs/platform/log/common/logService'; +-import { getEditorFeatures } from 'vs/editor/common/editorFeatures'; +-import { onUnexpectedError } from 'vs/base/common/errors'; + import { ExtensionKind, IEnvironmentService, IExtensionHostDebugParams } from 'vs/platform/environment/common/environment'; + + class SimpleModel implements IResolvedTextEditorModel { +@@ -517,10 +515,14 @@ export class StandaloneKeybindingService extends AbstractKeybindingService { this._onDidUpdateKeybindings.fire(); } @@ -338,6 +347,23 @@ index 01f2c6987ac..5d6abf9d561 100644 this._cachedResolver = new KeybindingResolver(defaults, overrides, (str) => this._log(str)); } return this._cachedResolver; +@@ -1155,16 +1157,6 @@ export module StandaloneServices { + } + } + +- // Instantiate all editor features +- const editorFeatures = getEditorFeatures(); +- for (const feature of editorFeatures) { +- try { +- instantiationService.createInstance(feature); +- } catch (err) { +- onUnexpectedError(err); +- } +- } +- + onDidInitialize.fire(); + + return instantiationService; diff --git a/src/vs/nls.ts b/src/vs/nls.ts index db57b98d67b..defd683e0b0 100644 --- a/src/vs/nls.ts @@ -1735,4 +1761,4 @@ index 4653e395be9..1eccfce4bf4 100644 - } // If we are in no-workspace or single-folder workspace, adding folders has to - // enter a workspace. + // enter a workspace. \ No newline at end of file diff --git a/src/monaco.ts b/src/monaco.ts index 0807fb38..9de29cb4 100644 --- a/src/monaco.ts +++ b/src/monaco.ts @@ -63,6 +63,7 @@ import 'vs/workbench/contrib/folding/browser/folding.contribution' import 'vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty' import 'vs/workbench/contrib/codeActions/browser/codeActions.contribution' import 'vs/workbench/contrib/list/browser/list.contribution' +import 'vs/workbench/contrib/codeEditor/browser/editorFeatures' class ExtensionPoints implements IWorkbenchContribution { constructor (