Ⅰ. 插件描述
C/C++ language server supporting multi-million line code base, powered by libclang. Emacs, Vim, VSCode, and others with language server protocol support. Cross references, completion, diagnostics, semantic highlighting and moreⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'cquery-project/cquery'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'cquery-project/cquery'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'cquery-project/cquery'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/cquery-project/cquery
Ⅳ. 文档说明
cquery
cquery is a highly-scalable, low-latency language server for C/C++/Objective-C. It is tested
and designed for large code bases like
Chromium. cquery provides
accurate and fast semantic analysis without interrupting workflow.

cquery implements almost the entire language server protocol and provides
some extra features to boot:
- code completion (with both signature help and snippets)
- finding definition/references
- call (caller/callee) hierarchy, inheritance (base/derived) hierarchy
- symbol rename
- document symbols and approximate search of workspace symbol
- hover information
- diagnostics
- code actions (clang FixIts)
- preprocessor skipped regions
include auto-complete, undefined type include insertion, include quick-jump
(goto definition, document links)
- auto-implement functions without a definition
- semantic highlighting, including support for rainbow semantic highlighting
>>> Getting started (CLICK HERE) <<<
Limitations
cquery is able to respond to queries quickly because it caches a huge amount of
- When a request comes in, cquery just looks it up in the cache
- running many computations. As a result, there's a large memory overhead.
For example, a full index of Chrome will take about 10gb of memory. If you
exclude v8, webkit, and third_party, it goes down to about 6.5gb.
License
MIT