diff --git a/FAQ.md b/FAQ.md index 1171fe3..765dfef 100644 --- a/FAQ.md +++ b/FAQ.md @@ -126,7 +126,12 @@ ccls will save a file in `cacheDirectory`: ... ``` -#### AST deserialisation error when precompiled headers are used +### System header completion + +* `print '%clang\n%cpp -std=gnu++14\n-isystem/usr/include' > .ccls` +* `(setq ccls-extra-init-params '(:clang (:extraArgs ["-isystem", "/usr/include"])))` + +### AST deserialisation error when precompiled headers are used Unfortunately, libclang is very picky when it comes to precompiled headers. Even if your system compiler and the bundled libclang are the same versions there will be problems. Namely, to avoid AST deresialisation errors while using PCH, you need to create them with the same toolchain which will be used inside ccls for completions.