deploy: f94927dc1d
This commit is contained in:
2
404.html
2
404.html
@@ -16,7 +16,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,4 +1,4 @@
|
||||
import{_ as s,c as a,o as l,ae as e}from"./chunks/framework.D8webtH5.js";const c=JSON.parse('{"title":"Build from Source","description":"","frontmatter":{},"headers":[],"relativePath":"dev/build.md","filePath":"en/dev/build.md"}'),n={name:"dev/build.md"};function t(h,i,p,k,r,o){return l(),a("div",null,i[0]||(i[0]=[e(`<h1 id="build-from-source" tabindex="-1">Build from Source <a class="header-anchor" href="#build-from-source" aria-label="Permalink to "Build from Source""></a></h1><h2 id="supported-platforms" tabindex="-1">Supported Platforms <a class="header-anchor" href="#supported-platforms" aria-label="Permalink to "Supported Platforms""></a></h2><ul><li>Windows</li><li>Linux</li><li>MacOS</li></ul><h2 id="prerequisites" tabindex="-1">Prerequisites <a class="header-anchor" href="#prerequisites" aria-label="Permalink to "Prerequisites""></a></h2><p>This section introduces the prerequisites for compiling clice.</p><h3 id="toolchain" tabindex="-1">Toolchain <a class="header-anchor" href="#toolchain" aria-label="Permalink to "Toolchain""></a></h3><ul><li>clang >= 19</li><li>c++23 compatible standard library <ul><li>MSVC STL >= 19.44(VS 2022 17.4)</li><li>GCC libstdc++ >= 14</li><li>Clang libc++ >= 20</li></ul></li></ul><p>clice uses C++23 as the language standard. Please ensure you have an available clang 19 or above compiler, as well as a standard library compatible with C++23.</p><blockquote><p>clice can currently only be compiled with clang. In the future, we will improve this to allow compilation with gcc and msvc.</p></blockquote><h3 id="llvm-libs" tabindex="-1">LLVM Libs <a class="header-anchor" href="#llvm-libs" aria-label="Permalink to "LLVM Libs""></a></h3><ul><li>20.1.5 <= llvm libs < 21</li></ul><p>Due to the complexity of C++ syntax, writing a new parser from scratch is unrealistic. clice calls clang's API to parse C++ source files and obtain AST, which means it needs to link llvm/clang libs. Additionally, since clice uses clang's private headers, these private headers are not available in llvm's binary release, so you cannot directly use the system's llvm package.</p><p>If you can find the llvm commit corresponding to your system's llvm package, copy the following three files from that commit:</p><ul><li><code>clang/lib/Sema/CoroutineStmtBuilder.h</code></li><li><code>clang/lib/Sema/TypeLocBuilder.h</code></li><li><code>clang/lib/Sema/TreeTransform.h</code></li></ul><p>Copy them to <code>LLVM_INSTALL_PATH/include/clang/Sema/</code>.</p><p>Besides this method, there are two other ways to obtain the llvm libs required by clice:</p><ol><li>Use our precompiled version</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># .github/workflows/cmake.yml</span></span>
|
||||
import{_ as i,c as a,o as l,ae as e}from"./chunks/framework.D8webtH5.js";const c=JSON.parse('{"title":"Build from Source","description":"","frontmatter":{},"headers":[],"relativePath":"dev/build.md","filePath":"en/dev/build.md"}'),n={name:"dev/build.md"};function t(h,s,p,r,k,o){return l(),a("div",null,s[0]||(s[0]=[e(`<h1 id="build-from-source" tabindex="-1">Build from Source <a class="header-anchor" href="#build-from-source" aria-label="Permalink to "Build from Source""></a></h1><h2 id="supported-platforms" tabindex="-1">Supported Platforms <a class="header-anchor" href="#supported-platforms" aria-label="Permalink to "Supported Platforms""></a></h2><ul><li>Windows</li><li>Linux</li><li>MacOS</li></ul><h2 id="prerequisites" tabindex="-1">Prerequisites <a class="header-anchor" href="#prerequisites" aria-label="Permalink to "Prerequisites""></a></h2><p>This section introduces the prerequisites for compiling clice.</p><h3 id="toolchain" tabindex="-1">Toolchain <a class="header-anchor" href="#toolchain" aria-label="Permalink to "Toolchain""></a></h3><ul><li>clang >= 19</li><li>c++23 compatible standard library <ul><li>MSVC STL >= 19.44(VS 2022 17.4)</li><li>GCC libstdc++ >= 14</li><li>Clang libc++ >= 20</li></ul></li></ul><p>clice uses C++23 as the language standard. Please ensure you have an available clang 19 or above compiler, as well as a standard library compatible with C++23.</p><blockquote><p>clice can currently only be compiled with clang. In the future, we will improve this to allow compilation with gcc and msvc.</p></blockquote><h3 id="llvm-libs" tabindex="-1">LLVM Libs <a class="header-anchor" href="#llvm-libs" aria-label="Permalink to "LLVM Libs""></a></h3><ul><li>20.1.5 <= llvm libs < 21</li></ul><p>Due to the complexity of C++ syntax, writing a new parser from scratch is unrealistic. clice calls clang's API to parse C++ source files and obtain AST, which means it needs to link llvm/clang libs. Additionally, since clice uses clang's private headers, these private headers are not available in llvm's binary release, so you cannot directly use the system's llvm package.</p><p>If you can find the llvm commit corresponding to your system's llvm package, copy the following three files from that commit:</p><ul><li><code>clang/lib/Sema/CoroutineStmtBuilder.h</code></li><li><code>clang/lib/Sema/TypeLocBuilder.h</code></li><li><code>clang/lib/Sema/TreeTransform.h</code></li></ul><p>Copy them to <code>LLVM_INSTALL_PATH/include/clang/Sema/</code>.</p><p>Besides this method, there are two other ways to obtain the llvm libs required by clice:</p><ol><li>Use our precompiled version</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># .github/workflows/cmake.yml</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Linux precompiled binary require glibc 2.35 (build on ubuntu 22.04)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mkdir</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -p</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./.llvm</span></span>
|
||||
@@ -23,4 +23,14 @@ import{_ as s,c as a,o as l,ae as e}from"./chunks/framework.D8webtH5.js";const c
|
||||
<span class="line"><span>├── include</span></span>
|
||||
<span class="line"><span>├── lib</span></span>
|
||||
<span class="line"><span>├── LICENSE</span></span>
|
||||
<span class="line"><span>├── README.md</span></span></code></pre></div><p>Hint: launch clice in the docker container by running the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --entrypoint</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span></span></code></pre></div>`,46)]))}const F=s(n,[["render",t]]);export{c as __pageData,F as default};
|
||||
<span class="line"><span>├── README.md</span></span></code></pre></div><p>Hint: launch clice in the docker container by running the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --entrypoint</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span></span></code></pre></div><h2 id="development-container" tabindex="-1">Development Container <a class="header-anchor" href="#development-container" aria-label="Permalink to "Development Container""></a></h2><p>We provide Docker images as a pre-configured environment to streamline the setup process. You can use the following scripts to manage the development container. These scripts can be run from the project root directory.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Build the development image</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./docker/linux/build.sh</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Run the container with the clang toolchain</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --compiler</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clang</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Run the container with the gcc toolchain</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --compiler</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gcc</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Reset the container (stops and removes the existing one)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --reset</span></span></code></pre></div><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>This feature is currently in a preview stage and only supports Linux. Windows support will be provided in the future, and the functionality may be subject to change.</p></div>`,50)]))}const F=i(n,[["render",t]]);export{c as __pageData,F as default};
|
||||
@@ -1 +1 @@
|
||||
import{_ as s,c as a,o as l,ae as e}from"./chunks/framework.D8webtH5.js";const c=JSON.parse('{"title":"Build from Source","description":"","frontmatter":{},"headers":[],"relativePath":"dev/build.md","filePath":"en/dev/build.md"}'),n={name:"dev/build.md"};function t(h,i,p,k,r,o){return l(),a("div",null,i[0]||(i[0]=[e("",46)]))}const F=s(n,[["render",t]]);export{c as __pageData,F as default};
|
||||
import{_ as i,c as a,o as l,ae as e}from"./chunks/framework.D8webtH5.js";const c=JSON.parse('{"title":"Build from Source","description":"","frontmatter":{},"headers":[],"relativePath":"dev/build.md","filePath":"en/dev/build.md"}'),n={name:"dev/build.md"};function t(h,s,p,r,k,o){return l(),a("div",null,s[0]||(s[0]=[e("",50)]))}const F=i(n,[["render",t]]);export{c as __pageData,F as default};
|
||||
@@ -15,7 +15,14 @@ import{_ as i,c as a,o as l,ae as n}from"./chunks/framework.D8webtH5.js";const o
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DCMAKE_CXX_FLAGS=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"--gcc-toolchain=/usr/local/gcc-14.3.0/"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DCMAKE_EXE_LINKER_FLAGS=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"-static-libgcc -static-libstdc++"</span></span></code></pre></div><h2 id="building" tabindex="-1">Building <a class="header-anchor" href="#building" aria-label="Permalink to "Building""></a></h2><p>在处理好前置依赖之后,可以开始构建 clice 了,我们提供 cmake/xmake 两种构建方式。</p><h3 id="cmake" tabindex="-1">CMake <a class="header-anchor" href="#cmake" aria-label="Permalink to "CMake""></a></h3><p>下面是 clice 支持的 cmake 参数</p><ul><li><code>LLVM_INSTALL_PATH</code> 用于指定 llvm libs 的安装路径</li><li><code>CLICE_ENABLE_TEST</code> 是否构建 clice 的单元测试</li></ul><p>例如</p><div class="language-bach vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bach</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>$ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_INSTALL_PATH="./.llvm" -DCLICE_ENABLE_TEST=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++</span></span>
|
||||
<span class="line"><span>$ cmake --build build</span></span></code></pre></div><h3 id="xmake" tabindex="-1">Xmake <a class="header-anchor" href="#xmake" aria-label="Permalink to "Xmake""></a></h3><p>使用如下的命令即可构建 clice</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xmake</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> f</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -c</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dev=true</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --mode=debug</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --toolchain=clang</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --llvm=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"./.llvm"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --enable_test=true</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xmake</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span></span></code></pre></div><blockquote><p>--llvm 是可选的,如果不指定的话,xmake 会自动下载我们编译好的预编译二进制</p></blockquote><h2 id="building-docker-image" tabindex="-1">Building Docker Image <a class="header-anchor" href="#building-docker-image" aria-label="Permalink to "Building Docker Image""></a></h2><p>使用以下命令构建 docker 镜像:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -t</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span></span></code></pre></div><p>运行 docker 镜像:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --help</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xmake</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span></span></code></pre></div><blockquote><p>--llvm 是可选的,如果不指定的话,xmake 会自动下载我们编译好的预编译二进制</p></blockquote><h2 id="dev-container" tabindex="-1">Dev Container <a class="header-anchor" href="#dev-container" aria-label="Permalink to "Dev Container""></a></h2><p>我们提供了 docker 镜像作为预装环境解决方案,可以有效地解决环境配置问题,可通过下列命令使用(不限脚本调用路径,可以直接运行 ./build.sh):</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># construct container</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker/linux/build.sh</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># run clang container</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --compiler</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clang</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># run gcc container</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --compiler</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gcc</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># reset container(delete exist container and reset)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --reset</span></span></code></pre></div><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>当前该功能仍处于 Preview 阶段,仅支持 Linux,后续会提供 Windows 平台版本,并可能存在功能改动</p></div><h2 id="building-docker-image" tabindex="-1">Building Docker Image <a class="header-anchor" href="#building-docker-image" aria-label="Permalink to "Building Docker Image""></a></h2><p>使用以下命令构建 docker 镜像:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -t</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span></span></code></pre></div><p>运行 docker 镜像:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --help</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">OVERVIEW:</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> is</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> a</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> new</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> generation</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> of</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> language</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> server</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> for</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> C/C++</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span></span></code></pre></div><p>docker 镜像的目录结构如下:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>/opt/clice</span></span>
|
||||
<span class="line"><span>├── bin</span></span>
|
||||
@@ -23,4 +30,4 @@ import{_ as i,c as a,o as l,ae as n}from"./chunks/framework.D8webtH5.js";const o
|
||||
<span class="line"><span>├── include</span></span>
|
||||
<span class="line"><span>├── lib</span></span>
|
||||
<span class="line"><span>├── LICENSE</span></span>
|
||||
<span class="line"><span>├── README.md</span></span></code></pre></div><p>提示:可以使用以下命令进入 clice 容器:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --entrypoint</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span></span></code></pre></div>`,46)]))}const F=i(e,[["render",t]]);export{o as __pageData,F as default};
|
||||
<span class="line"><span>├── README.md</span></span></code></pre></div><p>提示:可以使用以下命令进入 clice 容器:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --entrypoint</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span></span></code></pre></div>`,50)]))}const F=i(e,[["render",t]]);export{o as __pageData,F as default};
|
||||
@@ -1 +1 @@
|
||||
import{_ as i,c as a,o as l,ae as n}from"./chunks/framework.D8webtH5.js";const o=JSON.parse('{"title":"Build from Source","description":"","frontmatter":{},"headers":[],"relativePath":"zh/dev/build.md","filePath":"zh/dev/build.md"}'),e={name:"zh/dev/build.md"};function t(h,s,p,k,r,c){return l(),a("div",null,s[0]||(s[0]=[n("",46)]))}const F=i(e,[["render",t]]);export{o as __pageData,F as default};
|
||||
import{_ as i,c as a,o as l,ae as n}from"./chunks/framework.D8webtH5.js";const o=JSON.parse('{"title":"Build from Source","description":"","frontmatter":{},"headers":[],"relativePath":"zh/dev/build.md","filePath":"zh/dev/build.md"}'),e={name:"zh/dev/build.md"};function t(h,s,p,k,r,c){return l(),a("div",null,s[0]||(s[0]=[n("",50)]))}const F=i(e,[["render",t]]);export{o as __pageData,F as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -23,7 +23,7 @@
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">int</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> main</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> () {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> std</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::cout </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><<</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Hello world!"</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <<</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> std</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::endl;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>The <code>iostream</code> header file has about 20,000 lines of code. clice will first build the line <code>#include <iostream></code> into a PCH file, and after completion, use this PCH file to parse the subsequent code. This way, the amount of code that needs to be re-parsed later is reduced to just 5 lines instead of the original 20,000 lines, making it very fast. Unless you modify the code in the preamble section, which requires building a new preamble.</p><h2 id="cancel-compilation" tabindex="-1">Cancel Compilation <a class="header-anchor" href="#cancel-compilation" aria-label="Permalink to "Cancel Compilation""></a></h2></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/design/architecture" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Architecture</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/design/header-context" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Header Context</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -38,7 +38,7 @@
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// b.cpp</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">struct</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> X</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {};</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#include</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "a.h"</span></span></code></pre></div><p><code>a.h</code> itself cannot be compiled, but when embedded in <code>b.cpp</code>, it compiles normally. In this case, clangd will report an error in <code>a.h</code>, unable to find the definition of <code>X</code>. Obviously, this is because it treats <code>a.h</code> as an independent source file. There are many such header files in libstdc++ code, and some popular C++ header-only libraries also have such code, which clangd currently cannot handle.</p><p>clice will support <strong>header context</strong>, supporting automatic and user-initiated switching of header file states, and of course will also support non-self-contained header files. We want to achieve the following effect, using the first piece of code as an example. When you jump from <code>b.cpp</code> to <code>a.h</code>, use <code>b.cpp</code> as the context for <code>a.h</code>. Similarly, when you jump from <code>c.cpp</code> to <code>a.h</code>, use <code>c.cpp</code> as the context for <code>a.h</code>.</p></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/design/compilation" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Compilation</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/design/template-resolver" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Template Resolver</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
@@ -25,7 +25,7 @@
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> foo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">std</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">vector</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">std</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">vector</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">T</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>> </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">vec2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> vec2[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">].</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">^</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>From the user's perspective, completion should also be provided here, since the type of <code>vec2[0]</code> is also <code>vector<T></code>, right? Same as the previous example. But clangd won't provide any completion here. What's the problem? According to the C++ standard, the return type of <code>std::vector<T>::operator[]</code> is <code>std::vector<T>::reference</code>, which is actually a <a href="https://en.cppreference.com/w/cpp/language/dependent_name" target="_blank" rel="noreferrer">dependent name</a>. Its result seems quite direct - it's <code>T&</code>. But in libstdc++, its definition is nested in dozens of layers of templates, seemingly for compatibility with old standards? So why can't clangd handle this situation?</p><ol><li>It's based on primary template assumptions, not considering that partial specializations might make lookup impossible to proceed</li><li>It only performs name lookup without template instantiation, so even if it finds the final result, it can't map it back to the original template parameters</li><li>It doesn't consider default template parameters, unable to handle dependent names caused by default template parameters</li></ol><p>Although we can make exceptions for standard library types to provide related support, I hope that user code can have the same status as standard library code, so we need a universal algorithm to handle dependent types. To solve this problem, I wrote a pseudo-instantiation (pseudo instantiator). It can instantiate dependent types without specific types, achieving the purpose of simplification. For example, in the above example, <code>std::vector<std::vector<T>>::reference</code> can be simplified to <code>std::vector<T>&</code>, and further provide code completion options for users.</p></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/design/header-context" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Header Context</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/dev/build" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Build from Source</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -13,7 +13,7 @@
|
||||
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
<link rel="modulepreload" href="/assets/chunks/theme.rf236kCY.js">
|
||||
<link rel="modulepreload" href="/assets/chunks/framework.D8webtH5.js">
|
||||
<link rel="modulepreload" href="/assets/dev_build.md.CU4aDhpP.lean.js">
|
||||
<link rel="modulepreload" href="/assets/dev_build.md.BVixu1OK.lean.js">
|
||||
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
||||
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
||||
</head>
|
||||
@@ -43,8 +43,18 @@
|
||||
<span class="line"><span>├── include</span></span>
|
||||
<span class="line"><span>├── lib</span></span>
|
||||
<span class="line"><span>├── LICENSE</span></span>
|
||||
<span class="line"><span>├── README.md</span></span></code></pre></div><p>Hint: launch clice in the docker container by running the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --entrypoint</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/design/template-resolver" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Template Resolver</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/dev/contribution" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Contribution</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<span class="line"><span>├── README.md</span></span></code></pre></div><p>Hint: launch clice in the docker container by running the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --entrypoint</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span></span></code></pre></div><h2 id="development-container" tabindex="-1">Development Container <a class="header-anchor" href="#development-container" aria-label="Permalink to "Development Container""></a></h2><p>We provide Docker images as a pre-configured environment to streamline the setup process. You can use the following scripts to manage the development container. These scripts can be run from the project root directory.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Build the development image</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./docker/linux/build.sh</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Run the container with the clang toolchain</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --compiler</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clang</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Run the container with the gcc toolchain</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --compiler</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gcc</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Reset the container (stops and removes the existing one)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">./docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --reset</span></span></code></pre></div><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>This feature is currently in a preview stage and only supports Linux. Windows support will be provided in the future, and the functionality may be subject to change.</p></div></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/design/template-resolver" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Template Resolver</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/dev/contribution" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Contribution</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
@@ -32,7 +32,7 @@
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></li><li><p>Reload Window: After modifying the configuration, execute the <code>Developer: Reload Window</code> command in VS Code for the settings to take effect. The extension will automatically connect to the clice instance listening on port 50051.</p></li></ol><p>If you need to modify or debug the clice-vscode extension itself, follow these steps:</p><ol><li><p>Clone and install dependencies:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/clice-io/clice-vscode</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice-vscode</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span></span></code></pre></div></li><li><p>Open the extension project with VS Code: Open the <code>clice-vscode</code> folder in a new VS Code window.</p></li><li><p>Create debug configuration: In the <code>clice-vscode</code> project, also create a <code>.vscode/settings.json</code> file with the same content as above.</p></li><li><p>Press <code>F5</code>. This will launch an [Extension Development Host] window. This is a new VS Code window with your local clice-vscode extension code loaded. Open your C++ project in this new window, and it should automatically connect to clice.</p></li></ol></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/dev/contribution" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Contribution</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/guide/configuration" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Configuration</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"design_architecture.md":"B1nOS2BF","design_compilation.md":"CCvAsCts","design_header-context.md":"BxMpdImS","design_index.md":"iLhzg_qd","design_template-resolver.md":"BWRB2TFl","dev_build.md":"CU4aDhpP","dev_contribution.md":"BDlGKyx4","dev_test-and-debug.md":"BDhcoSZa","guide_configuration.md":"BX4EXUeC","guide_quick-start.md":"GKsihDbV","guide_what-is-clice.md":"BMyw_-9E","index.md":"JdQy7MpZ","zh_design_architecture.md":"BVGXXj2L","zh_design_compilation.md":"BpkOwlT8","zh_design_header-context.md":"6ANkDXaY","zh_design_index.md":"CRxI2HZv","zh_design_template-resolver.md":"C8xOYUnS","zh_dev_build.md":"DT8nwjoU","zh_dev_contribution.md":"DouHFQDZ","zh_dev_test-and-debug.md":"CECWy0Lv","zh_guide_configuration.md":"YRqjuVKw","zh_guide_quick-start.md":"BIzdzWD6","zh_guide_what-is-clice.md":"D_fcfWi8","zh_index.md":"DZmqz5yo"}
|
||||
{"design_architecture.md":"B1nOS2BF","design_compilation.md":"CCvAsCts","design_header-context.md":"BxMpdImS","design_index.md":"iLhzg_qd","design_template-resolver.md":"BWRB2TFl","dev_build.md":"BVixu1OK","dev_contribution.md":"BDlGKyx4","dev_test-and-debug.md":"BDhcoSZa","guide_configuration.md":"BX4EXUeC","guide_quick-start.md":"GKsihDbV","guide_what-is-clice.md":"BMyw_-9E","index.md":"JdQy7MpZ","zh_design_architecture.md":"BVGXXj2L","zh_design_compilation.md":"BpkOwlT8","zh_design_header-context.md":"6ANkDXaY","zh_design_index.md":"CRxI2HZv","zh_design_template-resolver.md":"C8xOYUnS","zh_dev_build.md":"xrKp7NV4","zh_dev_contribution.md":"DouHFQDZ","zh_dev_test-and-debug.md":"CECWy0Lv","zh_guide_configuration.md":"YRqjuVKw","zh_guide_quick-start.md":"BIzdzWD6","zh_guide_what-is-clice.md":"D_fcfWi8","zh_index.md":"DZmqz5yo"}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -23,7 +23,7 @@
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">int</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> main</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> () {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> std</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::cout </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><<</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Hello world!"</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> <<</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> std</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::endl;</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p><code>iostream</code> 这个头文件大概有 2w 行代码,clice 会先把 <code>#include <iostream></code> 这一行代码构建成 PCH 文件,在完成之后在使用这个 PCH 文件来解析后面的代码。这样的话后续重新解析的代码量就只剩 5 行了,而不是原本的 2w 行,速度会变得非常快。除非你修改了 preamble 部分的代码,导致需要构建新的 preamble。</p><h2 id="cancel-compilation" tabindex="-1">Cancel Compilation <a class="header-anchor" href="#cancel-compilation" aria-label="Permalink to "Cancel Compilation""></a></h2></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/zh/design/architecture" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Architecture</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/zh/design/header-context" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Header Context</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -38,7 +38,7 @@
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// b.cpp</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">struct</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> X</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {};</span></span>
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#include</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "a.h"</span></span></code></pre></div><p><code>a.h</code>自身不能被编译,但是嵌入到<code>b.cpp</code>中的时候就编译正常了。这种情况下 clangd 会在<code>a.h</code>中报错,找不到<code>X</code>的定义。显然这是因为它把<code>a.h</code>当成一个独立的源文件了。在 libstdc++ 中的代码中就有很多这样的头文件,现在流行的一些 C++ 的 header-only 的库也有些有这样的代码,clangd 目前无法处理它们。</p><p>clice 将会支持<strong>头文件上下文 (header context)</strong>,支持自动和用户主动切换头文件的状态,当然也会支持非自包含的头文件。我们想要实现如下的效果,以最开始那份代码为例。当你从<code>b.cpp</code>跳转到<code>a.h</code>的时候使用<code>b.cpp</code>作为<code>a.h</code>的上下文。同理,当你从<code>c.cpp</code>跳转到<code>a.h</code>的时候则使用<code>c.cpp</code>作为<code>a.h</code>的上下文。</p></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/zh/design/compilation" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Compilation</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/zh/design/template-resolver" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Template Resolver</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
@@ -25,7 +25,7 @@
|
||||
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> foo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">std</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">vector</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">std</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">vector</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">T</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>> </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">vec2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> vec2[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">].</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">^</span></span>
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>从用户的角度来说,这里也应该提供补全,毕竟<code>vec2[0]</code>的类型不也是<code>vector<T></code>吗?和前面一个例子一样。但是 clangd 在这里却不会为你提供任何补全,问题出在哪里?根据 C++ 标准,<code>std::vector<T></code>的<code>operator[]</code>返回的类型是<code>std::vector<T>::reference</code>,这其实是一个 <a href="https://en.cppreference.com/w/cpp/language/dependent_name" target="_blank" rel="noreferrer">dependent name</a>,它的结果似乎相当直接,就是<code>T&</code>。但是 libstdc++ 中它的定义却嵌套了十几层模板,似乎是为了兼容旧标准?那为什么 clangd 不能处理这种情况呢?</p><ol><li>它基于主模板假设,不考虑偏特化可能会使查找无法进行下去</li><li>它只进行名称查找而不进行模板实例化,就算找到了最后的结果,也没法把它和最初的模板参数映射起来</li><li>不考虑默认模板参数,无法处理由默认模板参数导致的依赖名</li></ol><p>尽管我们可以对标准库的类型开洞来提供相关的支持,但是我希望用户的代码能和标准库的代码有相同的地位,那么我们就需要一种通用的算法来处理依赖类型。为了解决这个问题,我编写了一个伪实例化器(pseudo instantiator)。它能在没有具体类型的前提下对依赖类型进行实例化,从而达到化简的目的。比如上面这个例子里面的<code>std::vector<std::vector<T>>::reference</code>就能被化简为<code>std::vector<T>&</code>,进一步就能为用户提供代码补全选项。</p></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/zh/design/header-context" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Header Context</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/zh/dev/build" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Build from Source</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -13,7 +13,7 @@
|
||||
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
<link rel="modulepreload" href="/assets/chunks/theme.rf236kCY.js">
|
||||
<link rel="modulepreload" href="/assets/chunks/framework.D8webtH5.js">
|
||||
<link rel="modulepreload" href="/assets/zh_dev_build.md.DT8nwjoU.lean.js">
|
||||
<link rel="modulepreload" href="/assets/zh_dev_build.md.xrKp7NV4.lean.js">
|
||||
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
||||
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
||||
</head>
|
||||
@@ -35,7 +35,14 @@
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DCMAKE_CXX_FLAGS=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"--gcc-toolchain=/usr/local/gcc-14.3.0/"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -DCMAKE_EXE_LINKER_FLAGS=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"-static-libgcc -static-libstdc++"</span></span></code></pre></div><h2 id="building" tabindex="-1">Building <a class="header-anchor" href="#building" aria-label="Permalink to "Building""></a></h2><p>在处理好前置依赖之后,可以开始构建 clice 了,我们提供 cmake/xmake 两种构建方式。</p><h3 id="cmake" tabindex="-1">CMake <a class="header-anchor" href="#cmake" aria-label="Permalink to "CMake""></a></h3><p>下面是 clice 支持的 cmake 参数</p><ul><li><code>LLVM_INSTALL_PATH</code> 用于指定 llvm libs 的安装路径</li><li><code>CLICE_ENABLE_TEST</code> 是否构建 clice 的单元测试</li></ul><p>例如</p><div class="language-bach vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bach</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>$ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_INSTALL_PATH="./.llvm" -DCLICE_ENABLE_TEST=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++</span></span>
|
||||
<span class="line"><span>$ cmake --build build</span></span></code></pre></div><h3 id="xmake" tabindex="-1">Xmake <a class="header-anchor" href="#xmake" aria-label="Permalink to "Xmake""></a></h3><p>使用如下的命令即可构建 clice</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xmake</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> f</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -c</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dev=true</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --mode=debug</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --toolchain=clang</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --llvm=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"./.llvm"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --enable_test=true</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xmake</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span></span></code></pre></div><blockquote><p>--llvm 是可选的,如果不指定的话,xmake 会自动下载我们编译好的预编译二进制</p></blockquote><h2 id="building-docker-image" tabindex="-1">Building Docker Image <a class="header-anchor" href="#building-docker-image" aria-label="Permalink to "Building Docker Image""></a></h2><p>使用以下命令构建 docker 镜像:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -t</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span></span></code></pre></div><p>运行 docker 镜像:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --help</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> xmake</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --all</span></span></code></pre></div><blockquote><p>--llvm 是可选的,如果不指定的话,xmake 会自动下载我们编译好的预编译二进制</p></blockquote><h2 id="dev-container" tabindex="-1">Dev Container <a class="header-anchor" href="#dev-container" aria-label="Permalink to "Dev Container""></a></h2><p>我们提供了 docker 镜像作为预装环境解决方案,可以有效地解决环境配置问题,可通过下列命令使用(不限脚本调用路径,可以直接运行 ./build.sh):</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># construct container</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker/linux/build.sh</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># run clang container</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --compiler</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clang</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># run gcc container</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --compiler</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gcc</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># reset container(delete exist container and reset)</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker/linux/run.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --reset</span></span></code></pre></div><div class="note custom-block github-alert"><p class="custom-block-title">NOTE</p><p>当前该功能仍处于 Preview 阶段,仅支持 Linux,后续会提供 Windows 平台版本,并可能存在功能改动</p></div><h2 id="building-docker-image" tabindex="-1">Building Docker Image <a class="header-anchor" href="#building-docker-image" aria-label="Permalink to "Building Docker Image""></a></h2><p>使用以下命令构建 docker 镜像:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -t</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span></span></code></pre></div><p>运行 docker 镜像:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --help</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">OVERVIEW:</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> is</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> a</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> new</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> generation</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> of</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> language</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> server</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> for</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> C/C++</span></span>
|
||||
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span></span></code></pre></div><p>docker 镜像的目录结构如下:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>/opt/clice</span></span>
|
||||
<span class="line"><span>├── bin</span></span>
|
||||
@@ -44,7 +51,7 @@
|
||||
<span class="line"><span>├── lib</span></span>
|
||||
<span class="line"><span>├── LICENSE</span></span>
|
||||
<span class="line"><span>├── README.md</span></span></code></pre></div><p>提示:可以使用以下命令进入 clice 容器:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -it</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --entrypoint</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/zh/design/template-resolver" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Template Resolver</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/zh/dev/contribution" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Contribution</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
@@ -32,7 +32,7 @@
|
||||
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></li><li><p>重新加载窗口:修改配置后,在 vscode 中执行 Developer: Reload Window 命令使配置生效。插件会自动连接到正在 50051 端口监听的 clice。</p></li></ol><p>如果你需要修改或调试 clice-vscode 插件本身,可以按以下步骤操作:</p><ol><li><p>克隆并安装依赖:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> git</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clone</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/clice-io/clice-vscode</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> clice-vscode</span></span>
|
||||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">$</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span></span></code></pre></div></li><li><p>使用 vscode 打开插件项目:用一个新的 vscode 窗口打开 clice-vscode 文件夹</p></li><li><p>创建调试配置:在 clice-vscode 项目中,也创建一个 <code>.vscode/settings.json</code> 文件,内容与上方相同</p></li><li><p>按下 <code>F5</code> 键。这会启动一个【扩展开发宿主】窗口。这是一个加载了你本地 clice-vscode 插件代码的新的 vscode 窗口,在这个新窗口中打开你的 C++ 项目,它应该会自动连接到 clice</p></li></ol></div></div></main><footer class="VPDocFooter" data-v-e6f2a212 data-v-1bcd8184><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-1bcd8184><span class="visually-hidden" id="doc-footer-aria-label" data-v-1bcd8184>Pager</span><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link prev" href="/zh/dev/contribution" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Previous page</span><span class="title" data-v-1bcd8184>Contribution</span><!--]--></a></div><div class="pager" data-v-1bcd8184><a class="VPLink link pager-link next" href="/zh/guide/configuration" data-v-1bcd8184><!--[--><span class="desc" data-v-1bcd8184>Next page</span><span class="title" data-v-1bcd8184>Configuration</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"CU4aDhpP\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"DT8nwjoU\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
<script>window.__VP_HASH_MAP__=JSON.parse("{\"design_architecture.md\":\"B1nOS2BF\",\"design_compilation.md\":\"CCvAsCts\",\"design_header-context.md\":\"BxMpdImS\",\"design_index.md\":\"iLhzg_qd\",\"design_template-resolver.md\":\"BWRB2TFl\",\"dev_build.md\":\"BVixu1OK\",\"dev_contribution.md\":\"BDlGKyx4\",\"dev_test-and-debug.md\":\"BDhcoSZa\",\"guide_configuration.md\":\"BX4EXUeC\",\"guide_quick-start.md\":\"GKsihDbV\",\"guide_what-is-clice.md\":\"BMyw_-9E\",\"index.md\":\"JdQy7MpZ\",\"zh_design_architecture.md\":\"BVGXXj2L\",\"zh_design_compilation.md\":\"BpkOwlT8\",\"zh_design_header-context.md\":\"6ANkDXaY\",\"zh_design_index.md\":\"CRxI2HZv\",\"zh_design_template-resolver.md\":\"C8xOYUnS\",\"zh_dev_build.md\":\"xrKp7NV4\",\"zh_dev_contribution.md\":\"DouHFQDZ\",\"zh_dev_test-and-debug.md\":\"CECWy0Lv\",\"zh_guide_configuration.md\":\"YRqjuVKw\",\"zh_guide_quick-start.md\":\"BIzdzWD6\",\"zh_guide_what-is-clice.md\":\"D_fcfWi8\",\"zh_index.md\":\"DZmqz5yo\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"clice\",\"description\":\"a powerful and modern C++ language server\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"}],\"sidebar\":{\"/zh/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/zh/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/zh/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/zh/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/zh/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/zh/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/zh/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/zh/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/zh/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/zh/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/zh/guide/what-is-clice\"}]}],\"/\":[{\"text\":\"Design\",\"collapsed\":false,\"items\":[{\"text\":\"Architecture\",\"link\":\"/design/architecture\"},{\"text\":\"Compilation\",\"link\":\"/design/compilation\"},{\"text\":\"Header Context\",\"link\":\"/design/header-context\"},{\"text\":\"Template Resolver\",\"link\":\"/design/template-resolver\"}]},{\"text\":\"Development\",\"collapsed\":false,\"items\":[{\"text\":\"Build from Source\",\"link\":\"/dev/build\"},{\"text\":\"Contribution\",\"link\":\"/dev/contribution\"},{\"text\":\"Test and Debug\",\"link\":\"/dev/test-and-debug\"}]},{\"text\":\"Guide\",\"collapsed\":false,\"items\":[{\"text\":\"Configuration\",\"link\":\"/guide/configuration\"},{\"text\":\"Quick Start\",\"link\":\"/guide/quick-start\"},{\"text\":\"What is clice?\",\"link\":\"/guide/what-is-clice\"}]}]},\"socialLinks\":[{\"icon\":\"discord\",\"link\":\"https://discord.gg/PA3UxW2VA3\"},{\"icon\":\"github\",\"link\":\"https://github.com/clice-io/clice\"}],\"outline\":\"deep\"},\"locales\":{\"root\":{\"label\":\"English\"},\"zh\":{\"label\":\"简体中文\"}},\"scrollOffset\":134,\"cleanUrls\":true}");</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user