|
|
@@ -15,14 +15,18 @@ import * as Effect from "effect/Effect"
|
|
|
|
|
|
export const InstanceBootstrap = Effect.gen(function* () {
|
|
|
Log.Default.info("bootstrapping", { directory: Instance.directory })
|
|
|
- yield* Plugin.Service.use((svc) => svc.init())
|
|
|
- yield* ShareNext.Service.use((svc) => svc.init()).pipe(Effect.forkDetach)
|
|
|
- yield* Format.Service.use((svc) => svc.init()).pipe(Effect.forkDetach)
|
|
|
- yield* LSP.Service.use((svc) => svc.init())
|
|
|
- yield* File.Service.use((svc) => svc.init()).pipe(Effect.forkDetach)
|
|
|
- yield* FileWatcher.Service.use((svc) => svc.init()).pipe(Effect.forkDetach)
|
|
|
- yield* Vcs.Service.use((svc) => svc.init()).pipe(Effect.forkDetach)
|
|
|
- yield* Snapshot.Service.use((svc) => svc.init()).pipe(Effect.forkDetach)
|
|
|
+ yield* Effect.all(
|
|
|
+ [
|
|
|
+ Plugin.Service,
|
|
|
+ LSP.Service,
|
|
|
+ ShareNext.Service,
|
|
|
+ Format.Service,
|
|
|
+ File.Service,
|
|
|
+ FileWatcher.Service,
|
|
|
+ Vcs.Service,
|
|
|
+ Snapshot.Service,
|
|
|
+ ].map((s) => Effect.forkDetach(s.use((i) => i.init()))),
|
|
|
+ )
|
|
|
|
|
|
yield* Bus.Service.use((svc) =>
|
|
|
svc.subscribeCallback(Command.Event.Executed, async (payload) => {
|