Language Server Protocol

The Language Server Protocol (LSP) defines the protocol used between an editor or IDE to talk to a language server that provides language features like auto complete, goto definition, find all references.


What is the Language Server Protocol?

Implementing support for features like autocomplete, goto definition, or documentation on hover for a programming language is a significant effort. Traditionally this work must be repeated for each development tool, as each provides different APIs for implementing the same features.

The idea behind a Language Server is to provide the language-specific smarts inside a server that can communicate with development tooling over a protocol that enables inter-process communication.

The idea behind the Language Server Protocol (LSP) is to standardize the protocol for how tools and servers communicate, so a single Language Server can be re-used in multiple development tools, and tools can support languages with minimal effort.

LSP is a win for both langauge providers and tooling vendors!


Overview

The protocol defines the format of the messages sent using JSON-RPC between the development tool and the language server.

Specification

The latest version of the protocol specification is version 3.0.

Implementations

The LSP has been implemented for many languages and many development tools are integrating these language servers.