diff --git a/src/additionalExtensions.ts b/src/additionalExtensions.ts index b5cd527..990ab8c 100644 --- a/src/additionalExtensions.ts +++ b/src/additionalExtensions.ts @@ -1 +1,8 @@ -export { whenReady } from '../extensions/*.vsix' +import { whenReady as whenReadyCustomExtension } from './customExtensions' +import { whenReady as whenReadyExtension } from '../extensions/*.vsix' + +const whenReady = async () => { + await Promise.all([whenReadyCustomExtension(), whenReadyExtension()]) +} + +export { whenReady } diff --git a/src/customExtensions/cobol.ts b/src/customExtensions/cobol.ts index 957ca0b..62a61c4 100644 --- a/src/customExtensions/cobol.ts +++ b/src/customExtensions/cobol.ts @@ -1,6 +1,6 @@ import { ExtensionHostKind, registerExtension } from '@codingame/monaco-vscode-api/extensions' -const { registerFileUrl } = registerExtension( +const { registerFileUrl, whenReady } = registerExtension( { name: 'cobol-indent', publisher: 'codingame', @@ -41,3 +41,5 @@ const { registerFileUrl } = registerExtension( ) registerFileUrl('./extension.js', new URL('./cobol-extension.js', import.meta.url).href) + +export { whenReady } diff --git a/src/customExtensions/index.ts b/src/customExtensions/index.ts index 99281a2..2caadbc 100644 --- a/src/customExtensions/index.ts +++ b/src/customExtensions/index.ts @@ -1 +1 @@ -import './cobol' +export { whenReady } from './cobol' diff --git a/src/services.ts b/src/services.ts index 7624f96..effe31f 100644 --- a/src/services.ts +++ b/src/services.ts @@ -33,7 +33,6 @@ import { IWorkbenchConstructionOptions, IWorkspaceProvider } from '@codingame/mo import EditorOpenHandlerRegistry from './tools/EditorOpenHandlerRegistry' import { whenReady as whenExtensionsReady } from './extensions' import 'vscode/localExtensionHost' -import './customExtensions' import './languages' import './worker'