Building a Scala 3 LSP Server
Welcome to the first part of our series where I’ll take you through my journey of creating a Language Server Protocol (LSP) implementation for HOCON configuration files used in Smart Data Lake Builder. This exciting project combines several technologies: Scala 3 for implementation, LSP for providing IDE-like features, and HOCON as the configuration language for data lake operations.
The LSP currently handles code completion with AI-augmented suggestions and hover information. It supports four different strategies to handle multi-file completion awareness, which is especially useful when working with multiple environments. It also leverages HOCON for its own custom configuration.
Who Should Read This Series?
This blog series is for you if you are:
- Curious about how modern IDEs help you with your coding journey
- Serious about building an LSP yourself
- Interested in understanding why Scala 3 is a great choice for building low-latency and complex software
- Eager to learn important Scala 3 features and design patterns through a real project example
What You’ll Learn
By the end of this LSP series, you’ll see how to implement the following features:
1. Basic Code Completion

2. ✨ AI-Augmented Code Completion ✨

3. Hovering Capability

4. Multi-File Context Awareness

5. Secure Streamlined Logs in the Client
Works in IntelliJ, VSCode, Cursor, and more

6. Generating Default Template Configs

📦 View the source code on GitHub – Explore the complete implementation. Leave a star if you like it!