plugins.lsp.servers.ccls.initOptions.cache.directory
If your project is /a/b
, cache directories will be created at /a/b/.ccls-cache/@a@b/
(files under the project root) /a/b/.ccls-cache/@@a@b/
(files outside the project root,
e.g. /usr/include/stdio.h).
If the path name is longer than the system limit, set cache.hierarchicalPath
to true.
The cache files will be stored in a hierarchical manner: /a/b/.ccls-cache/a/b/
.
Be careful if you specify an absolute path as files indexed by different projects may
conflict.
This can also be an absolute path.
Because the project path is encoded with @
, cache directories of different projects will
not conflict.
When ccls is started, it will try loading cache files if they are not stale (compile command
line matches and timestamps of main source and its #include
(direct and transitive)
dependencies do not change).
If the argument is an empty string, the cache will be stored only in memory. Use this if you don’t want to write cache files.
Example: "/tmp/ccls-cache"
Plugin default: ".ccls-cache"
Type: null or string or raw lua code
Default:
null
Declared by:
plugins.lsp.servers.ccls.initOptions.cache.format
Specify the format of the cached index files. Binary is a compact binary serialization format.
If you would like to inspect the contents of the cache you can change this to "json"
then
use a JSON formatter such as jq . < /tmp/ccls/@tmp@c/a.cc.json
to display it.
Plugin default: "binary"
Type: null or string or raw lua code
Default:
null
Declared by:
plugins.lsp.servers.ccls.initOptions.cache.retainInMemory
Change to 0 if you want to save memory, but having multiple ccls processes operating in the same directory may corrupt ccls’s in-memory representation of the index.
After this number of loads, keep a copy of file index in memory (which increases memory usage). During incremental updates, the removed file index will be taken from the in-memory copy, instead of the on-disk file.
Every index action is counted: the initial load, a save action.
- 0: never retain
- 1: retain after initial load
- 2: retain after 2 loads (initial load+first save)
Plugin default: 1
Type: null or one of 0, 1, 2 or raw lua code
Default:
null
Declared by: