Developers often rely on the Markdown language when it comes to writing documentation or other texts, for example. Microsoft has also equipped the source code editor Visual Studio Code with integrated support for Markdown. A new feature in VS Code is a language server for Markdown, which makes the options – from document outlines to intelligent decomposition (folding) to path completions – of this support directly available to other editors and tools.
Markdown and the Language Server Protocol
Microsoft, Red Hat and Codenvy jointly introduced the Language Server Protocol (LSP) in June 2016. This protocol is used for communication between the tool and so-called language servers, which provide logic for different programming languages. It implements a uniform interface between development environments and servers installed locally on a workstation for specific programming languages or applications, which in turn can supply context-dependent information to the IDE.
Two new open source libraries make up the server
The newly introduced Markdown Language Server has been split by the VS Code team into two new, very similarly named open source libraries:
Markdown Language Service – A TypeScript library providing tools for working with Markdown.Markdown Language Server – A language server for Markdown developed with the help of the Language Service.
The developers note that while these libraries are still in early stages, they are already being used by VS Code 1.70+. According to them, there have been a number of immediate benefits from this transition, including moving Markdown tools to a separate process. As a result, the tools can no longer block other extensions.
Programmers interested in reviewing or contributing to the source code can find the Markdown service and server on GitHub and npm. Microsoft also provides detailed information on the Language Server Protocol there.
To home page