mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-21 23:25:07 +00:00
C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
87f36a4a96
1. libClangDriver.a shipped by MSYS2 needs -lversion which is not included in CMAKE_CXX_STANDARD_LIBRARIES by default. 2. Use string literal for DEFAULT_RESOURCE_DIRECTORY to support backslashes in path. |
||
---|---|---|
ci | ||
clang_archive_hashes | ||
cmake | ||
index_tests | ||
src | ||
third_party | ||
.clang-format | ||
.gitignore | ||
.gitmodules | ||
CMakeLists.txt | ||
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
- call (caller/callee) hierarchy, inheritance (base/derived) hierarchy, member hierarchy
- symbol rename
- document symbols and approximate search of workspace symbol
- hover information
- diagnostics
- code actions (clang FixIts)
- preprocessor skipped regions
- semantic highlighting, including support for rainbow semantic highlighting
It makes use of C++17 features, has less third-party dependencies and slimmed-down code base. Cross reference features are strenghened, (see wiki/FAQ. It currently uses libclang to index C++ code but will switch to Clang C++ API. 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.