mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-25 09:05:10 +00:00
Readme polish
This commit is contained in:
parent
14009293ba
commit
ca7d404a54
46
README.md
46
README.md
@ -1,36 +1,35 @@
|
|||||||
# Notice
|
# Notice
|
||||||
|
|
||||||
cquery is not yet production ready. I use it day-to-day, but there are still a number of significant issues and unimplemented features.
|
cquery is not yet production ready. I use it day-to-day, but there are still
|
||||||
|
a number of rough edges.
|
||||||
|
|
||||||
# cquery
|
# cquery
|
||||||
|
|
||||||
[![Join the chat at https://gitter.im/cquery-project/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cquery-project/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[![Join the chat at https://gitter.im/cquery-project/Lobby](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/cquery-project/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
|
||||||
cquery is a low-latency language server for C++. It is extremely scalable and
|
cquery is a highly-scalable, low-latency language server for C++. It is tested
|
||||||
has been designed for and tested on large code bases like
|
and designed for large code bases like
|
||||||
[Chromium](https://chromium.googlesource.com/chromium/src/). It's primary goal
|
[Chromium](https://chromium.googlesource.com/chromium/src/). cquery provides
|
||||||
is to make working on large code bases much faster by providing accurate and
|
accurate and fast semantic analysis without interrupting workflow.
|
||||||
fast semantic analysis.
|
|
||||||
|
|
||||||
![Demo](/images/demo.png?raw=true)
|
![Demo](/images/demo.png?raw=true)
|
||||||
|
|
||||||
There are rough edges (especially when editing), but it is already possible to
|
cquery implements almost the entire language server protocol and provides
|
||||||
be productive with cquery. Here's a list of implemented features:
|
some extra features to boot:
|
||||||
|
|
||||||
* code completion (with both signature help and snippets)
|
* code completion (with both signature help and snippets)
|
||||||
* references
|
* references
|
||||||
* type hierarchy
|
* type hierarchy (parent type, derived types, expandable tree view)
|
||||||
* calls to functions, calls to base and derived functions
|
* calls to functions, calls to base and derived functions, call tree
|
||||||
* rename
|
* symbol rename
|
||||||
* goto definition, goto base method
|
* goto definition, goto base method
|
||||||
* document symbol search
|
* document and global symbol search
|
||||||
* global symbol search
|
* hover tooltips showing symbol type
|
||||||
* hover
|
|
||||||
* diagnostics
|
* diagnostics
|
||||||
* code actions (clang FixIts)
|
* code actions (clang FixIts)
|
||||||
* darken/fade code disabled by preprocessor
|
* darken/fade code disabled by preprocessor
|
||||||
* #include auto-complete and quick-jump (goto definition, document links)
|
* #include auto-complete, undefined type include insertion, include quick-jump
|
||||||
* explorable call tree, expandable type hierarchy (requires vscode insiders)
|
(goto definition, document links)
|
||||||
* auto-include undefined symbol
|
|
||||||
* auto-implement functions without a definition
|
* auto-implement functions without a definition
|
||||||
|
|
||||||
# Setup - build cquery, install extension, setup project
|
# Setup - build cquery, install extension, setup project
|
||||||
@ -43,7 +42,7 @@ steps to only project setup.
|
|||||||
|
|
||||||
Building cquery is simple. The external dependencies are few:
|
Building cquery is simple. The external dependencies are few:
|
||||||
|
|
||||||
- clang (3.4 or greater)
|
- relatively modern c++11 compiler (ie, clang 3.4 or greater)
|
||||||
- python
|
- python
|
||||||
- git
|
- git
|
||||||
|
|
||||||
@ -72,12 +71,14 @@ If you run into issues, you can view debug output by running the
|
|||||||
|
|
||||||
### Part 1: System includes
|
### Part 1: System includes
|
||||||
|
|
||||||
cquery will likely fail to resolve system includes like `<vector>` unless the include path is updated to point to them. Add the system include paths to `cquery.extraClangArguments`. For example,
|
cquery will likely fail to resolve system includes like `<vector>` unless the
|
||||||
|
include path is updated to point to them. Add the system include paths to
|
||||||
|
`cquery.index.extraClangArguments`. For example,
|
||||||
|
|
||||||
```js
|
```js
|
||||||
{
|
{
|
||||||
// ...
|
// ...
|
||||||
"cquery.extraClangArguments": [
|
"cquery.index.extraClangArguments": [
|
||||||
// Generated by running the following in a Chrome checkout:
|
// Generated by running the following in a Chrome checkout:
|
||||||
// $ ./third_party/llvm-build/Release+Asserts/bin/clang++ -v ash/debug.cc
|
// $ ./third_party/llvm-build/Release+Asserts/bin/clang++ -v ash/debug.cc
|
||||||
"-isystem/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8",
|
"-isystem/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8",
|
||||||
@ -106,10 +107,11 @@ $ ninja -C out/Release -t compdb cxx cc > compile_commands.json
|
|||||||
|
|
||||||
The `compile_commands.json` file should be in the top-level workspace directory.
|
The `compile_commands.json` file should be in the top-level workspace directory.
|
||||||
|
|
||||||
#### cquery.extraClangArguments
|
#### cquery.index.extraClangArguments
|
||||||
|
|
||||||
If for whatever reason you cannot generate a `compile_commands.json` file, you
|
If for whatever reason you cannot generate a `compile_commands.json` file, you
|
||||||
can add the flags to the `cquery.extraClangArguments` configuration option.
|
can add the flags to the `cquery.index.extraClangArguments` configuration
|
||||||
|
option.
|
||||||
|
|
||||||
#### clang_args
|
#### clang_args
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user