Initialization options

Jacob Dufault edited this page Aug 2, 2018 · 26 revisions

Overview

cquery can be customized. Typically these options go through the initialize request, but clients frequently do not expose this customization knob. As a result, cquery provides cquery --init ....

For a list and description of all options, see src/config.h.

Usage Examples

Here are some examples for how to use the --init command line parameter:

Command line

cquery --init='{"index": {"comments": 2}}'

Single quotes are used to escape words in bash/zsh.

Visual Studio Code

"cquery.launch.args": ["--init={\"index\": {\"comments\": 2}}"]

Emacs

(setq cquery-extra-init-params
    '(:index (:comments 2) :cacheFormat "msgpack"))

(setq cquery-extra-init-params
    '(:extraClangArguments ("--driver-mode=cl"))

Shell Script

$ cat ~/path/start_cquery.sh

#!/usr/bin/env sh
cquery --log-file /tmp/cquery_log.txt --init='{
  "cacheDirectory": "/work/cquery-cache/chrome/",
  "progressReportFrequencyMs": -1
}'
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.