8835a555f8
This fixes a plethora of "not indexed" errors when the document has not been indexed. * Message handler throws NotIndexed if not overdue * The message is put into backlog and tagged with backlog_path * path2backlog[path] tracks backlog associated with document `path` * The backlog is cleared when the index is merged * backlog[0] is forced to run if it becomes overdue |
||
---|---|---|
ci | ||
clang_archive_hashes | ||
cmake | ||
index_tests | ||
src | ||
third_party | ||
.appveyor.yml | ||
.clang-format | ||
.gitignore | ||
.gitmodules | ||
CMakeLists.txt | ||
LICENSE | ||
README.md |
ccls
ccls, which originates from cquery, is a C/C++/Objective-C language server.
- code completion (with both signature help and snippets)
- definition/references, and other cross references
- cross reference extensions:
$ccls/call
$ccls/inheritance
$ccls/member
$ccls/vars
... - formatting
- hierarchies: call (caller/callee) hierarchy, inheritance (base/derived) hierarchy, member hierarchy
- symbol rename
- document symbols and approximate search of workspace symbol
- hover information
- diagnostics and code actions (clang FixIts)
- semantic highlighting and preprocessor skipped regions
- semantic navigation:
$ccls/navigate
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 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.