C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
Go to file
Shengjing Zhu 9079c48c77 Support override CLANG_RESOURCE_DIR
The result from clang commandline is something like
/usr/lib/llvm-7/lib/clang/7.0.1

Which means I need to recompile when the clang is upgraded to newer 7.x.x

However the system has a convenient symlink, which is
/usr/include/clang/7.
2019-08-16 08:23:15 +08:00
.github Add .github/ISSUE_TEMPLATE 2019-05-13 00:26:55 -07:00
ci Use clang_File_tryGetRealPathName 2018-04-07 16:46:22 -07:00
index_tests Fix EnumConstantDecl's kind & EnumDecl's vars 2019-01-09 15:19:23 +08:00
src Construct SourceManager with UserFilesAreVolatile 2019-07-31 19:29:34 -07:00
third_party rapidjson url (#43) 2018-08-03 09:37:31 -07:00
.appveyor.yml cmake: delete SYSTEM_CLANG and auto-download mechanism 2019-03-17 18:50:25 -07:00
.clang-format First draft: replace libclang indexer with clangIndex 2018-07-07 15:43:05 -07:00
.gitignore Add .github/ISSUE_TEMPLATE 2019-05-13 00:26:55 -07:00
.gitmodules rapidjson url (#43) 2018-08-03 09:37:31 -07:00
CMakeLists.txt Support override CLANG_RESOURCE_DIR 2019-08-16 08:23:15 +08:00
LICENSE Add Apache LICENSE file (#121) 2019-01-09 15:19:23 +08:00
README.md Misc 2019-05-13 00:26:55 -07:00

ccls

Telegram Gitter

ccls, which originates from cquery, is a C/C++/Objective-C language server.

It has a global view of the code base and support a lot of cross reference features, see wiki/FAQ. It starts indexing the whole project (including subprojects if exist) parallelly when you open the first file, while the main thread can serve requests before the indexing is complete. Saving files will incrementally update the index.

Compared with cquery, it makes use of C++17 features, has less third-party dependencies and slimmed-down code base. It leverages Clang C++ API as clangd does, which provides better support for code completion and diagnostics. Refactoring is a non-goal as it can be provided by clang-include-fixer and other Clang based tools.

The comparison with cquery as noted on 2018-07-15:

cquery ccls
third_party more fewer
C++ C++14 C++17
clang API libclang (C) clang/llvm C++
Filesystem AbsolutePath + custom routines llvm/Support
index libclang clangIndex, some enhancement
pipeline index merge+id remapping simpler and more robust

cquery has system include path detection (through running the compiler driver) while ccls uses clangDriver.

>>> Getting started (CLICK HERE) <<<

ccls can index itself (~180MiB RSS when idle, noted on 2018-09-01), FreeBSD, glibc, Linux, LLVM (~1800MiB RSS), musl (~60MiB RSS), ... with decent memory footprint. See wiki/compile_commands.json for examples.