Editing Support for Software Languages: Implementation Practices in Language Server ProtocolsP&I
Effectively using software languages, be it modeling or programming languages, requires effective editing support. Modern IDEs, modeling tools, and code editors typically provide sophisticated support to create, comprehend, or modify models and programs of particular languages. Unfortunately, building such editing support is challenging. While the engineering of languages is well understood and supported by modern, model-driven techniques (e.g., meta-modeling, model transformations, and automated mapping between concrete and abstract syntax), there is a lack of engineering principles and best practices for realizing their editing support. Especially domain-specific modeling languages often created by smaller organizations or individual developers, sometimes even for single projects would benefit from better editing support. The language server protocol (LSP) is a recent de facto standard that allows modularizing a languages editing support into a so-called language server. Tooling such as IDEs or modeling tools that support LSP can then reuse a language server, instead of having to develop, maintain, and evolve the editing support by itself. LSP allows disseminating new languages into a myriad of editing tools. A whopping 121 currently existing language servers illustrate the increasing popularity of the standard. Still, developers would benefit from engineering principles or best practices when implementing editing support for their software language. Recognizing this opportunity, we investigate a substantial sample of 30 language servers. We study the editing support features provided in relation to the kinds of languages, as well as we qualitatively analyze their implementations. We contribute a set of engineering challenges and proposed solutions that language engineers can use to create editing support for their domain-specific modeling or programming language.