Smithy definitions for the Language Server Protocol (LSP), enabling type-safe LSP client and server implementations in Scala.
This project converts the official LSP specification into Smithy format, allowing you to generate type-safe Scala code using Smithy4s. The generated code can be used with jsonrpclib's smithy4s integration to build LSP clients and servers.
The core artifact containing the Smithy definitions for LSP.
sbt:
libraryDependencies += "io.github.simple-scala-tooling" % "lsp-smithy-definitions" % "x.y.z"Mill:
ivy"io.github.simple-scala-tooling:lsp-smithy-definitions:x.y.z"scala-cli:
//> using dep io.github.simple-scala-tooling:lsp-smithy-definitions:x.y.zThis artifact includes:
lsp.smithy- Complete LSP specification in Smithy format- Manifest file for Smithy code generation
See the exampleClient module for a complete working example of an LSP client.
For a real-world usage example, check out SLS (Simple Language Server), a Scala language server that uses this library to provide type-safe LSP communication.
This project tracks the official LSP specification. The current version is based on LSP 3.18.
This project relies on:
- jsonrpclib - JSON-RPC implementation
- Smithy4s - Smithy code generation for Scala
- alloy-core - Additional Smithy traits
Apache 2.0 - See LICENSE for details.
Contributions are welcome! The Smithy definitions are automatically generated from the official LSP specification.