Skip to content

Commit 546c46f

Browse files
committed
fix(work): await whenready of cobol extension
1 parent 868cdd2 commit 546c46f

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/additionalExtensions.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
import './customExtensions'
2-
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'

0 commit comments

Comments
 (0)