1- import { Plugin } from "../plugin"
21import { Format } from "../format"
32import { LSP } from "../lsp"
43import { File } from "../file"
@@ -8,6 +7,7 @@ import * as Vcs from "./vcs"
87import { Bus } from "../bus"
98import { Command } from "../command"
109import { Instance } from "./instance"
10+ import { Plugin } from "../plugin"
1111import { Log } from "@/util"
1212import { FileWatcher } from "@/file/watcher"
1313import { ShareNext } from "@/share"
@@ -16,12 +16,10 @@ import { Config } from "@/config"
1616
1717export const InstanceBootstrap = Effect . gen ( function * ( ) {
1818 Log . Default . info ( "bootstrapping" , { directory : Instance . directory } )
19- // everything depends on config so eager load it for nice traces
20- yield * Config . Service . use ( ( svc ) => svc . get ( ) )
21- // Plugin can mutate config so it has to be initialized before anything else.
22- yield * Plugin . Service . use ( ( svc ) => svc . init ( ) )
23- yield * Effect . all (
24- [
19+ yield * Effect . all ( [
20+ Config . Service . use ( ( i ) => i . get ( ) ) ,
21+ ...[
22+ Plugin . Service ,
2523 LSP . Service ,
2624 ShareNext . Service ,
2725 Format . Service ,
@@ -30,7 +28,7 @@ export const InstanceBootstrap = Effect.gen(function* () {
3028 Vcs . Service ,
3129 Snapshot . Service ,
3230 ] . map ( ( s ) => Effect . forkDetach ( s . use ( ( i ) => i . init ( ) ) ) ) ,
33- ) . pipe ( Effect . withSpan ( "InstanceBootstrap.init" ) )
31+ ] ) . pipe ( Effect . withSpan ( "InstanceBootstrap.init" ) )
3432
3533 yield * Bus . Service . use ( ( svc ) =>
3634 svc . subscribeCallback ( Command . Event . Executed , async ( payload ) => {
0 commit comments