Code Less to Code More: Streamlining Language Server Protocol and Type System Development for Language Families
Abstract
Developing editing support for languages in editors is complex and time-consuming. Some languages do not provide dedicated editors, while others offer a single native editor. The (LSP) reduces the language-editor combinations to , where a single language server communicates with editors via LSP plugins. However, overlapping implementations of linguistic components remain an issue. Existing language workbenches struggle with modularity, reusability, and leveraging type systems for language server generation. In this work, we propose: (i) Typelang, a family of domain-specific languages for modular, composable, and reusable type system implementation, (ii) a modular language server generation process, producing servers for languages built in a modular workbench, (iii) the variant-oriented programming paradigm and a cross-artifact coordination layer to manage interdependent software variants, and (iv) an LSP plugin generator, reducing to by automating plugin creation for multiple editors. To simplify editing support for language families, each language artifact integrates its own Typelang variant, used to generate language servers. This reduces combinations to , where represents the number of type systems. Further reuse of language artifacts across languages lowers this to , where , representing unique type systems. We implement Typelang in Neverlang, generating language servers for each artifact and LSP plugins for three editors. Empirical evaluation shows a 93.48% reduction in characters needed for type system implementation and 100% automation of LSP plugin generation, significantly lowering effort for editing support in language families, especially when artifacts are reused.
Keywords
Cite
@article{arxiv.2509.15150,
title = {Code Less to Code More: Streamlining Language Server Protocol and Type System Development for Language Families},
author = {Federico Bruzzone and Walter Cazzola and Luca Favalli},
journal= {arXiv preprint arXiv:2509.15150},
year = {2026}
}
Comments
34 pages, 10 figures, Journal of Systems and Software, June 2025, for the replication package, see https://doi.org/10.5281/zenodo.15276991