Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

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
}'