From 3b74971efd0df853784e6dd8573a02c20c33a3f8 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 20 Nov 2018 21:08:28 -0800 Subject: [PATCH] Clarify clang.pathMapping --- Initialization-options.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Initialization-options.md b/Initialization-options.md index 0306709..d646177 100644 --- a/Initialization-options.md +++ b/Initialization-options.md @@ -32,18 +32,18 @@ You may use `clang.excludeArgs` to exclude GCC specific options that are unknown ## `clang.pathMappings` -If cache files were built with project root `/tmp/container`, and you want to reuse them with a different project root `/host`: +If cache files were built with project root `/tmp/container/proj`, and you want to reuse them with a different project root `/host/proj`: ```javascript -{ "clang": { "pathMappings": ["/container:/host"] } +{ "clang": { "pathMappings": ["/container/:/host/"] } ``` Copy cache files: ```zsh -rsync -a /tmp/ccls/@tmp@container/ /tmp/ccls/@tmp@host/ # files under project root -rsync -a /tmp/ccls/@@tmp@container/ /tmp/ccls/@@tmp@host/ # files outside of project root +rsync -a /tmp/ccls/@tmp@container@proj/ /tmp/ccls/@tmp@host@proj/ # files under project root +rsync -a /tmp/ccls/@@tmp@container@proj/ /tmp/ccls/@@tmp@host@proj/ # files outside of project root ``` -Open `/tmp/host/a.cc`, the cache file `/tmp/ccls/@tmp@host/a.cc.blob` will be reused. When `a.cc` is saved (re-indexed), the newly generated `a.cc.blob` will not contain `/tmp/container` paths any more. +Open `/tmp/host/proj/a.cc`, the cache file `/tmp/ccls/@tmp@host@proj/a.cc.blob` will be reused. When `a.cc` is saved (re-indexed), the newly generated `a.cc.blob` will not contain `/tmp/container` paths any more. ## `client.snippetSupport`