diff --git a/scripts/vscode.patch b/scripts/vscode.patch index 6ef2c123..822546fd 100644 --- a/scripts/vscode.patch +++ b/scripts/vscode.patch @@ -319,7 +319,7 @@ 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..b7e352978d6 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 { @@ -338,6 +338,37 @@ index 01f2c6987ac..5d6abf9d561 100644 this._cachedResolver = new KeybindingResolver(defaults, overrides, (str) => this._log(str)); } return this._cachedResolver; +@@ -1155,6 +1159,17 @@ export module StandaloneServices { + } + } + ++ onDidInitialize.fire(); ++ ++ return instantiationService; ++ } ++ ++ /** ++ * Should be called only once, after the service collection has been initialized. This is not ++ * part of the init of the services, because we want to trigger all lifecycle functions before ++ * we initialize editor features. ++ */ ++ export function instantiateEditorFeatures() { + // Instantiate all editor features + const editorFeatures = getEditorFeatures(); + for (const feature of editorFeatures) { +@@ -1163,11 +1178,7 @@ export module StandaloneServices { + } 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 diff --git a/src/services.ts b/src/services.ts index cd7b5d0c..39d8ec5e 100644 --- a/src/services.ts +++ b/src/services.ts @@ -34,7 +34,11 @@ export async function initialize (overrides: IEditorOverrideServices, container? ...overrides }) + // Allow our initialization participants to run first... await startup(instantiationService) + + // Then finally initialize the editor services + StandaloneServices.instantiateEditorFeatures() } export async function getService (identifier: ServiceIdentifier): Promise {