Skip to content
Junfeng Li edited this page Jul 3, 2018 · 14 revisions

CQuery is a Low-latency language server for large C++ code-bases, powered by libclang.

Building

See https://github.com/jacobdufault/cquery#build-cquery

Configuration

let g:LanguageClient_serverCommands = {
\ 'cpp': ['yourCQueryDirectory/build/release/bin/cquery', '--log-file=/tmp/cq.log', '--init={"cacheDirectory":"/var/cquery/"}']                                                                                                                                                                              
\ }
" Use an absolute configuration path if you want system-wide settings
" let g:LanguageClient_settingsPath = '/home/yourusername/.config/nvim/settings.json'

Use with deoplete

Make sure you have installed the latest versions of deoplete (after cbcdf10-20171203) and LanguageClient-neovim (after https://github.com/autozimu/LanguageClient-neovim/pull/193 is merged).

Also install Neosnippet and configure:

imap <C-k>     <Plug>(neosnippet_expand_or_jump)
smap <C-k>     <Plug>(neosnippet_expand_or_jump)
xmap <C-k>     <Plug>(neosnippet_expand_target)

to your kepmappings. After that you may invoke <C-k> to expand and iterate over a completion item.

Clone this wiki locally