Skip to main content
Exploring ideas, sharing knowledge
Hidden Peaks Unlocked!
Looks like you found the hidden peaks! Future posts are now visible.
Peaks Hidden Again
The future posts are hidden once more. You know how to find them again.
Scala 3 LSP Server Architecture Diagram

Building a Scala 3 LSP Server

2 min 232 words

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

GIF example of basic code completion

2. ✨ AI-Augmented Code Completion ✨

GIF example of AI-augmented code completion

3. Hovering Capability

GIF example of hovering capability

4. Multi-File Context Awareness

GIF example of multi-file awareness

5. Secure Streamlined Logs in the Client

Works in IntelliJ, VSCode, Cursor, and more
GIF example of streamlined logs

6. Generating Default Template Configs

GIF example of LSP default template

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

Share this article