Frequently Asked Question
What is the Language Server Protocol and how does Vim use it?
The Language Server Protocol (LSP) is a JSON-RPC interface, originally designed
by Microsoft for VS Code, that decouples editors from language tooling. Instead
of every editor implementing its own Python autocomplete, its own TypeScript
type-checker, its own Rust go-to-definition, an editor speaks a single protocol
to a separate language server process that handles the language-specific work.
The same rust-analyzer binary now powers code intelligence in VS Code, Vim,
Neovim, Emacs, Helix, and Sublime Text.
Neovim has had a built-in LSP client since version 0.5 (2021); for classic Vim,
users typically install plugins like coc.nvim or vim-lsp. The visible result
is everything you would expect from an IDE: real-time diagnostics underlining
errors, completion as you type, hover documentation, go-to-definition jumps,
rename-symbol refactors, and so on. The language server runs as a subprocess
and communicates over stdin and stdout in the background.
Installing servers is usually one step: apt install rust-analyzer,
npm install -g typescript-language-server, or use a manager like
mason.nvim that pulls servers on demand. Once the server is on your PATH,
the editor side often takes only a handful of lines of configuration. The model
has unified a previously fragmented landscape of editor plugins into a single
reusable layer.