The Language Server Protocol (LSP) is an open standard created by Microsoft that defines how code editors communicate with language-specific intelligence servers. Before LSP, every editor had to implement its own support for every programming language, autocompletion, go-to-definition, error highlighting, refactoring, hover documentation. LSP decoupled the problem: a language server provides the intelligence, and any editor that speaks the protocol can use it. Write one TypeScript language server, and it works in VS Code, Neovim, Sublime Text, Emacs, and every other LSP-compatible editor. This single protocol eliminated thousands of redundant integrations and made it practical for even niche languages to have world-class editor support.
LSP emerged from a specific pain point inside Microsoft. When the VS Code team was building their editor in 2014-2015, they needed rich language support for dozens of programming languages but did not want to embed language analysis directly into the editor's codebase. The team, led by Erich Gamma (one of the original "Gang of Four" design patterns authors), recognized that language intelligence is a separate concern from editor UI. They created a JSON-RPC based protocol where the editor sends notifications about what the user is doing (opening files, typing, requesting completions) and the language server responds with structured data (completion items, diagnostic errors, symbol locations). Microsoft open-sourced the protocol in June 2016, and it was adopted almost immediately. Red Hat built language servers for Java. The Rust community built rust-analyzer. The Go team built gopls. The TypeScript team built tsserver, which predated LSP but was later adapted to work with it. Today, LSP has implementations for over 100 programming languages and is supported by virtually every serious code editor on the market.
LSP works through a client-server architecture where the editor is the client and a separate process is the server. Communication happens over JSON-RPC, typically through stdin/stdout pipes or TCP sockets. When you open a TypeScript file in your editor, the LSP client sends a textDocument/didOpen notification to the TypeScript language server. As you type, the client sends textDocument/didChange notifications. When you hover over a variable, the client sends a textDocument/hover request and the server responds with type information and documentation. The protocol defines dozens of these request/response pairs: textDocument/completion for autocomplete, textDocument/definition for go-to-definition, textDocument/references for find-all-references, textDocument/rename for safe renames across files. What makes LSP particularly elegant is its capability negotiation: on startup, the client and server exchange their supported features, so editors gracefully degrade when a language server does not support a particular operation. The same pattern that LSP established, a protocol that decouples intelligence from interface, has directly inspired the Model Context Protocol for AI tools.
Visit: microsoft.github.io/language-server-protocol
Want an app built with the best developer tooling and standards? I take that seriously.