|
|
@@ -7,23 +7,29 @@ import * as Vcs from "./vcs"
|
|
|
import { Bus } from "../bus"
|
|
|
import { Command } from "../command"
|
|
|
import { Instance } from "./instance"
|
|
|
+import { Plugin } from "../plugin"
|
|
|
import { Log } from "@/util"
|
|
|
import { FileWatcher } from "@/file/watcher"
|
|
|
import { ShareNext } from "@/share"
|
|
|
import * as Effect from "effect/Effect"
|
|
|
+import { Config } from "@/config"
|
|
|
|
|
|
export const InstanceBootstrap = Effect.gen(function* () {
|
|
|
Log.Default.info("bootstrapping", { directory: Instance.directory })
|
|
|
yield* Effect.all(
|
|
|
[
|
|
|
- LSP.Service,
|
|
|
- ShareNext.Service,
|
|
|
- Format.Service,
|
|
|
- File.Service,
|
|
|
- FileWatcher.Service,
|
|
|
- Vcs.Service,
|
|
|
- Snapshot.Service,
|
|
|
- ].map((s) => Effect.forkDetach(s.use((i) => i.init()))),
|
|
|
+ Config.Service.use((i) => i.get()),
|
|
|
+ ...[
|
|
|
+ Plugin.Service,
|
|
|
+ LSP.Service,
|
|
|
+ ShareNext.Service,
|
|
|
+ Format.Service,
|
|
|
+ File.Service,
|
|
|
+ FileWatcher.Service,
|
|
|
+ Vcs.Service,
|
|
|
+ Snapshot.Service,
|
|
|
+ ].map((s) => s.use((i) => i.init())),
|
|
|
+ ].map((e) => Effect.forkDetach(e)),
|
|
|
).pipe(Effect.withSpan("InstanceBootstrap.init"))
|
|
|
|
|
|
yield* Bus.Service.use((svc) =>
|