Clangd: architecture of a scalable C++ language server
summary
Clangd is an LLVM/Clang-based Language Server Protocol implementation that targets editor integration and large codebases by combining a compiler-driven AST for the current translation unit with a project-wide static + dynamic index (built roughly daily and overlaid with edited files). It implements global completion that merges AST completions with indexed symbols, automatically inserts missing #includes, and ranks candidates by name match and project usage counts. It runs via LSP in VS Code, Vim, Emacs, scales to Google‑scale repos, and is already used experimentally by Apple and JetBrains.
AI-written summary · about
chapters (10)
- 0:00Intro
- 1:14Overview
- 3:12Editor integration problem
- 7:31Language Server Protocol (LSP)
- 14:31Architecture of clangd
- 20:14Models of your program
- 31:01Code completion flow
- 36:03Ranking example Query: 'uniq
- 39:16Embedding in a Web IDE
- 44:08Future plans








