
A Language Server for your DSL for Fun and Profit (bobkonf2025)
Chaos Computer Club - recent events feed · Hannes Siebenhandl
March 14, 202541m 32s
Audio is streamed directly from the publisher (cdn.media.ccc.de) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.
Show Notes
Domain-specific languages (DSL) are well-studied tools for solving problems specific to a domain. Especially in the Haskell Community, DSLs are quite popular due to parser-combinators and succinct definitions of abstract syntax trees (AST). However, it is often difficult to integrate a particular DSL into any modern IDE. This causes a DSL to be harder to use in practice and negatively affects productivity. Sometimes, developers combat this by implementing plugins that introduce syntax highlighting specific to an editor. However, we argue that it is preferable to use existing infrastructure, such as the Language Server Protocol, which provides out-of-the-box IDE support for most editors.
In this talk, we focus on key challenges for implementing a Language Server, as a Language Server simply has different requirements from a parser or an interpreter. We discuss how to approach the design and implementation of a DSL such that we get Language Server support (almost) for free. In particular, we show how to provide advanced IDE features, such as semantics-aware syntax highlighting or automatic refactorings, with minimal effort. To implement this, we augment the AST to retain additional information about the sources, such as parentheses, comments, and whitespace, in a non-intrusive way.
Licensed to the public under https://creativecommons.org/licenses/by/3.0/de
about this event: https://bobkonf.de/2025/siebenhandl.html
Topics
52025bob2025TalkTalks #1bob2025-engBOBBOB KonferenzDay 1