C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
Go to file
Riatre Foo 3c5ab61762 Normalize paths on Windows
1. Normalize paths in LSP document URIs and project root to forward
slash and uppercase drive letters.
2. Normalize paths in compile_commands.json to forward slash and
uppercase drive letters.
3. Normalize paths from directory listing to forward slash. (Drive
letter should be same as input dir path, which is already uppercase
since path of project root dir is normalized)
4. Add llvm::sys::path::convert_to_slash after certain llvm::sys::path
and llvm::fs calls.
2019-10-24 18:37:30 -07:00
ci Use clang_File_tryGetRealPathName 2019-10-23 21:56:50 -07:00
clang_archive_hashes cmake: for -DSYSTEM_CLANG=off, 6.0.0 -> 6.0.1 2019-10-24 01:01:21 -07:00
cmake Fix compile on Windows + MSYS2-MinGW64 (#46) 2019-10-24 01:01:21 -07:00
index_tests Make CXXConversion references wider; use getTypedefNameForAnonDecl; improve CXXDestructor CXXConversion spell 2019-10-24 01:13:24 -07:00
src Normalize paths on Windows 2019-10-24 18:37:30 -07:00
third_party Remove ASTUnit from indexer and clean up 2019-10-24 01:13:22 -07:00
.clang-format First draft: replace libclang indexer with clangIndex 2019-10-24 00:53:16 -07:00
.gitignore . 2019-10-23 21:56:50 -07:00
.gitmodules rapidjson url (#43) 2019-10-24 01:01:21 -07:00
CMakeLists.txt Remove $ccls/base and clean up; deduplicate codeLens 2019-10-24 01:13:24 -07:00
README.md README 2019-10-24 01:13:24 -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 and formatting are non-goals as they can be provided by clang-format, 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 ide, 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.