Practise LSP vocabulary: client-server architecture, text document synchronisation, diagnostics, code actions, hover, and completions.
0 / 5 completed
1 / 5
The Language Server Protocol separates language intelligence into a ___ that any editor (client) can communicate with over JSON-RPC.
LSP defines a standardised protocol between an editor (LSP client) and a language server (LSP server) providing language intelligence. One language server (e.g., rust-analyzer) can serve any LSP-compatible editor — VS Code, Neovim, Emacs — without per-editor integration.
2 / 5
In LSP, ___ synchronisation keeps the language server informed of document changes as the user types.
Text document synchronisation defines how editors notify language servers of file changes: textDocument/didOpen, textDocument/didChange, textDocument/didSave. The server maintains a mirror of open documents to compute completions and diagnostics.
3 / 5
LSP ___ are warnings and errors reported by the language server and displayed as squiggles in the editor.
Diagnostics are language errors, warnings, hints, and information messages. The language server sends textDocument/publishDiagnostics with locations and severity. The editor displays them as squiggles, gutter icons, and in the Problems panel.
4 / 5
LSP ___ are quick fixes and refactorings offered when a user places the cursor on a diagnostic or invokes the lightbulb.
Code actions (textDocument/codeAction) are contextual commands: 'Fix this error', 'Extract method', 'Add import'. They're triggered by the editor when the user invokes the lightbulb, right-clicks, or uses a keyboard shortcut.
5 / 5
LSP ___ (Go to Definition) allows users to jump from a symbol usage to the location where it's defined.
textDocument/definition handles 'Go to Definition' — the language server returns the location (file + position) of the symbol's definition. This requires the server to resolve the symbol at the cursor position through semantic analysis.