index.trackDependency

Fangrui Song 2018-09-24 00:11:12 -07:00
parent 906f0c8487
commit dce477b06b

@ -15,6 +15,16 @@ This can also be an absolute path. Because the project path is encoded with `@`,
If empty, cache will be stored in memory. Every time a file is re-indexed, the cache will be written to the disk. Use this if you don't want to write cache files.
## `cacheFormat`: serialization format of cache files
Default: `"binary"`, a compact binary serialization format.
Use
```javascript
{ "cacheFormat": "json" }
```
if you want to inspect the cache file (`IndexFile`), e.g. `jq . < /tmp/ccls/@tmp@c/a.cc.json`
## `clang.extraArgs` `clang.excludeArgs`
Additional arguments or excluded arguments for `compile_commands.json` entries.
@ -109,15 +119,15 @@ This is best used in conjunction with empty `cacheDirectory` to avoid writing ca
}
```
## `cacheFormat`: serialization format of cache files
## `index.trackDependency`
Default: `"binary"`, a compact binary serialization format.
Default: 2
Use
```javascript
{ "cacheFormat": "json" }
```
if you want to inspect the cache file (`IndexFile`), e.g. `jq . < /tmp/ccls/@tmp@c/a.cc.json`
If `a.h` has been changed, when you open `a.cc` which includes `a.h`, an index request will be sent and `a.cc` will be reparsed.
If set to 0, `a.cc` will not be reparsed because its dependencies (included files) have changed timestamps.
1 sits between the two cases: the 2 behavior (default) is used before the initial load while the 0 behavior is used afterwards.
## `completion.filterAndSort`: completion filtering and sorting