mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
874be9223a
Sadly there is some confusion about ranges in the LSP protocol. It turns out that VS code, when requesting code actions, sends range s,e in the request, with the associated meaning that e is _included_ in the range, i.e. the interval is [s,e]. The emacs lsp-mode also uses this convention. However, the protocl specifies that the end in the range s,e should not be part of the interval, i.e. s,e is supposed to correspond to [s,e[: https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#range This was brought up with emacs-lsp, where the maintainer stated that he prefers to stay compatbile with VS code rather than the protocol, and that the protocol should likely be amended: https://github.com/emacs-lsp/lsp-mode/issues/3144 If that is the case, ccls intersection between ranges should be amended for now, such that the end parameter is part of the range. |
||
---|---|---|
.github | ||
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.
>>> 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/Project-Setup for examples.