Protocols
Saved & recent

Language Server Protocol

Also called: LSP, language server

The Language Server Protocol connects an editor to a service that understands a programming language. It standardizes exchanges for features such as completion, diagnostics and navigation, so language support can be reused across editors. The base protocol carries JSON-RPC messages with headers that delimit their encoded content.

An editor can announce a changed document and ask for completions at the cursor. The server analyzes the document and returns suggestions, while the editor controls their presentation. In the inspected 3.18 specification, initialization exchanges capability information; a client should use supported features rather than assume every server implements every optional operation.

Read first
JSON-RPC
Related
JSON-RPC, Debug Adapter Protocol, Message framing, LSP initialization, LSP document synchronization
Further reading
editor A editor B LSP 3.18 same implementation separate process examples client capabilities server features initialization first textDocument/completion suggestions
A common protocol lets different editors reuse a language-server implementation. Available features depend on exchanged capabilities.

View in the full Protocols collection