Building a DSL (Domain Specific Language) with XText — Part II — Implement a WebSocket-based Language Server

Nadeeshaan Gunasinghe
7 min readJul 10, 2024

In our previous post, we looked at how to set up your XText-based DSL project to implement a DSL from scratch. In this post, we are going to resume from where we stopped. Here, our focus would be integrating the DSL editing capability with an editor and enabling language features.

Language Intelligence

When we code with a programming language, 99% of the time, we use an (Integrated Development Environment) IDE. Now, if we raise the question, Why don't we use a plain text editor such as Vim or Notepad ? What will be your answer? Your answer will be to get language-sensitive features and assistance during the development. If you are working with a familiar programming language or a completely new language, you need a certain level of automated language intelligence.

How to Provide Language Intelligence

If we take IDEs like IntelliJIdea, they have their own embedded intelligence provider for the supported programming languages. If we consider an editor such as VSCode, you can install the available language-specific plugins and get the language features working.

--

--

Nadeeshaan Gunasinghe

Autor, Expert Software Engineer at Zuhlke Group - Singapore, Microservices Enthusiast, Full-stack Developer, Hardcore Cricket Fan, Sci-fi Addict ;)