ccls is an open-source C, C++, and Objective-C language server for developers who want cross-references, code hierarchies, completion, and semantic highlighting inside an LSP-compatible editor.
What it is
ccls is a language server written in C++ that speaks the Language Server Protocol, so it plugs into any LSP-capable editor rather than binding you to a particular IDE. It originates from the cquery project and keeps that project's focus on treating the whole code base as an indexed, queryable structure rather than as individual open files. It provides completion with signature help and snippets, definition and references lookups, formatting, rename, document symbols, hover information, diagnostics with clang FixIts as code actions, and semantic highlighting that also marks preprocessor skipped regions.
The concrete problem it solves is navigating large C-family code bases where the answer to a question is rarely contained in one file. ccls builds a global view of the project by indexing the whole code base, including subprojects, in parallel as soon as you open the first file, and it serves requests on the main thread before that indexing has finished, so you are not blocked waiting for a cold index. Saving a file incrementally updates the index. On top of the standard cross-reference requests it exposes its own extended requests, $ccls/call, $ccls/inheritance, $ccls/member, $ccls/vars, and $ccls/navigate, which let an editor walk relationships that plain LSP does not model.
Key capabilities
- Code completion with both signature help and snippets, alongside plain definition and references cross references.
- Extended cross-reference requests
$ccls/call, $ccls/inheritance, $ccls/member, and $ccls/vars for queries beyond standard LSP.
- Hierarchies implemented as dedicated handlers: a caller/callee call hierarchy (
src/messages/ccls_call.cc), a base/derived inheritance hierarchy (src/messages/ccls_inheritance.cc), and a member hierarchy (src/messages/ccls_member.cc).
- Symbol rename, document symbols, and approximate workspace symbol search.
- Hover information plus diagnostics and code actions backed by clang FixIts.
- Semantic highlighting that also reports preprocessor skipped regions, and semantic navigation via
$ccls/navigate.
- Whole-project parallel indexing that begins on the first file opened and updates incrementally on save, with memory footprints reported around 180MiB RSS idle when indexing itself, about 1800MiB for LLVM, and about 60MiB for musl.
Who uses it and how
- C, C++, and Objective-C developers who work inside an LSP-speaking editor and want project-wide cross references rather than single-file navigation.
- Programmers working on very large code bases — the README notes ccls indexes itself, FreeBSD, glibc, Linux, LLVM, and musl with a decent memory footprint.
- Teams that need hierarchy browsing during review or refactoring, using the caller/callee, base/derived, and member hierarchy requests to trace structure across files.
- Contributors who need stale-code comprehension, since indexing runs in parallel while the main thread still serves requests, and saving updates the index incrementally.
- Users reading
wiki/Project-Setup for concrete examples of configuring a project for indexing.
Getting started
The README directs you to the project's wiki/Home page, with dedicated wiki/Build and wiki/FAQ pages, for build instructions rather than a single packaged install command.
How it compares
No list of paid products it replaces is given, so among similar tools it can only be placed by the topics attached to it: cpp, ide, language-server-protocol, and lsp-server, which position it squarely as a general LSP server for the C family. The registry names no competing projects alongside it, so it stands alone in this registry on that footing.
When to use it — and when not
The trade-off is that ccls works by maintaining its own persistent index of an entire project, which means memory use scales with the code base — the README's own figures run from roughly 60MiB for musl to around 1800MiB for LLVM — and you should read wiki/Project-Setup to configure indexing correctly. It is a poor fit if you want a zero-configuration, single-file experience or if your editor cannot speak LSP. Note also that the repository carries 194 open issues; it is Apache-2.0 licensed, written in C++, and active as of its most recent push.