Skip to content

effectify LSP service#18321

Draft
kitlangton wants to merge 4 commits intodevfrom
kit/effectify-lsp
Draft

effectify LSP service#18321
kitlangton wants to merge 4 commits intodevfrom
kit/effectify-lsp

Conversation

@kitlangton
Copy link
Contributor

Summary

  • Migrate LSP from legacy Instance.state() to the Effect service pattern (Interface, Service, layer, async facades via runPromiseInstance)
  • Wire LSP.Service into InstanceServices union and lookup() in instances.ts
  • Add runSyncInstance helper to runtime.ts
  • Mark LSP as done in the migration spec

Details

  • State (clients, servers, broken, spawning) is held as closure variables in the layer
  • Server config loading runs in the layer body via Effect.promise
  • Cleanup (shutting down all LSP clients) uses Effect.addFinalizer
  • All public functions remain as async facades with identical signatures
  • Instance.directory replaced with directory captured from InstanceContext

Test plan

  • bun run typecheck in packages/opencode -- no new errors (pre-existing Effect version mismatch errors remain, same as File/Skill/etc.)
  • Grep confirms Instance.state is fully removed from lsp/index.ts
  • Manual smoke test: LSP features (hover, diagnostics, go-to-definition) work as before

…pattern

Replace the legacy Instance.state() pattern in LSP with Interface,
Service, layer, and async facades using runPromiseInstance. Wire
LSP.Service into InstanceServices and add runSyncInstance helper.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant