Readme polish

This commit is contained in:
Jacob Dufault 2017-06-14 00:08:25 -07:00
parent 14009293ba
commit ca7d404a54

View File

@ -1,36 +1,35 @@
# 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
[![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
has been designed for and tested on large code bases like
[Chromium](https://chromium.googlesource.com/chromium/src/). It's primary goal
is to make working on large code bases much faster by providing accurate and
fast semantic analysis.
cquery is a highly-scalable, low-latency language server for C++. It is tested
and designed for large code bases like
[Chromium](https://chromium.googlesource.com/chromium/src/). cquery provides
accurate and fast semantic analysis without interrupting workflow.
![Demo](/images/demo.png?raw=true)
There are rough edges (especially when editing), but it is already possible to
be productive with cquery. Here's a list of implemented features:
cquery implements almost the entire language server protocol and provides
some extra features to boot:
* code completion (with both signature help and snippets)
* references
* type hierarchy
* calls to functions, calls to base and derived functions
* rename
* type hierarchy (parent type, derived types, expandable tree view)
* calls to functions, calls to base and derived functions, call tree
* symbol rename
* goto definition, goto base method
* document symbol search
* global symbol search
* hover
* document and global symbol search
* hover tooltips showing symbol type
* diagnostics
* code actions (clang FixIts)
* darken/fade code disabled by preprocessor
* #include auto-complete and quick-jump (goto definition, document links)
* explorable call tree, expandable type hierarchy (requires vscode insiders)
* auto-include undefined symbol
* #include auto-complete, undefined type include insertion, include quick-jump
(goto definition, document links)
* auto-implement functions without a definition
# 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:
- clang (3.4 or greater)
- relatively modern c++11 compiler (ie, clang 3.4 or greater)
- python
- git
@ -72,12 +71,14 @@ If you run into issues, you can view debug output by running the
### 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
{
// ...
"cquery.extraClangArguments": [
"cquery.index.extraClangArguments": [
// Generated by running the following in a Chrome checkout:
// $ ./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",
@ -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.
#### cquery.extraClangArguments
#### cquery.index.extraClangArguments
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