Skip to content

Commit 6346783

Browse files
authored
Merge pull request #140 from CodinGame/jrf/fix-import-cobol-extension
FIX[WORK]: fix import of cobol extension
2 parents fea6e20 + 546c46f commit 6346783

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

src/additionalExtensions.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
export { whenReady } from '../extensions/*.vsix'
1+
import { whenReady as whenReadyCustomExtension } from './customExtensions'
2+
import { whenReady as whenReadyExtension } from '../extensions/*.vsix'
3+
4+
const whenReady = async () => {
5+
await Promise.all([whenReadyCustomExtension(), whenReadyExtension()])
6+
}
7+
8+
export { whenReady }

src/customExtensions/cobol.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ExtensionHostKind, registerExtension } from '@codingame/monaco-vscode-api/extensions'
22

3-
const { registerFileUrl } = registerExtension(
3+
const { registerFileUrl, whenReady } = registerExtension(
44
{
55
name: 'cobol-indent',
66
publisher: 'codingame',
@@ -41,3 +41,5 @@ const { registerFileUrl } = registerExtension(
4141
)
4242

4343
registerFileUrl('./extension.js', new URL('./cobol-extension.js', import.meta.url).href)
44+
45+
export { whenReady }

src/customExtensions/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import './cobol'
1+
export { whenReady } from './cobol'

src/services.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import { IWorkbenchConstructionOptions, IWorkspaceProvider } from '@codingame/mo
3333
import EditorOpenHandlerRegistry from './tools/EditorOpenHandlerRegistry'
3434
import { whenReady as whenExtensionsReady } from './extensions'
3535
import 'vscode/localExtensionHost'
36-
import './customExtensions'
3736
import './languages'
3837
import './worker'
3938

0 commit comments

Comments
 (0)