import{_ as e,c as i,o as a,ae as n}from"./chunks/framework.l7bN90nj.js";const k=JSON.parse('{"title":"Extension","description":"","frontmatter":{},"headers":[],"relativePath":"dev/extension.md","filePath":"en/dev/extension.md"}'),t={name:"dev/extension.md"};function l(o,s,p,d,h,c){return a(),i("div",null,[...s[0]||(s[0]=[n(`<h1 id="extension" tabindex="-1">Extension <a class="header-anchor" href="#extension" aria-label="Permalink to &quot;Extension&quot;">​</a></h1><p>This section covers development and release workflows for the editor extensions (VSCode / Neovim / Zed).</p><h2 id="vscode" tabindex="-1">VSCode <a class="header-anchor" href="#vscode" aria-label="Permalink to &quot;VSCode&quot;">​</a></h2><p>The VSCode extension uses the Node/PNPM/VSCE toolchain. Work inside the pixi <code>node</code> environment for consistent versions.</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:#6A737D;--shiki-dark:#6A737D;"># prepare environment (install pixi first)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pixi</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> shell</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -e</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> node</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># install deps (uses pnpm-lock)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pixi</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install-vscode</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># package the extension; outputs editors/vscode/*.vsix</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pixi</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build-vscode</span></span></code></pre></div><p>Publish to the VSCode Marketplace (<code>VSCE_PAT</code> env var required):</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;">pixi</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> publish-vscode</span></span></code></pre></div><div class="tip custom-block github-alert"><p class="custom-block-title">TIP</p><p>If clice is already built locally, set <code>clice.executable</code> in VSCode settings to point the extension to your custom binary.</p></div><p>Develop and debug:</p><ol><li><code>pixi shell -e node</code></li><li>In <code>editors/vscode</code>, run <code>pnpm run watch</code> for incremental builds</li><li>In VSCode, use the “Run Extension/Launch Extension” configs, or run <code>code --extensionDevelopmentPath=$(pwd)/editors/vscode</code></li></ol><p>Common scripts (inside <code>pixi shell -e node</code>):</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;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> package</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # same as pixi run build-vscode</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> publish</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # same as pixi run publish-vscode</span></span></code></pre></div><p>If you skip pixi, install node.js &gt;= 20 and pnpm yourself, then in <code>editors/vscode</code> run:</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;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> run</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> package</span></span></code></pre></div><h2 id="neovim" tabindex="-1">Neovim <a class="header-anchor" href="#neovim" aria-label="Permalink to &quot;Neovim&quot;">​</a></h2><p>The Neovim extension lives in <code>editors/nvim</code> and is written in Lua. It is still evolving.</p><ul><li>Add the repo path to <code>runtimepath</code>, e.g. <code>set rtp+=/path/to/clice/editors/nvim</code></li><li>Or create a local symlink: <code>~/.config/nvim/pack/clice/start/clice</code> -&gt; <code>&lt;repo&gt;/editors/nvim</code></li><li>Ensure the <code>clice</code> executable is discoverable in <code>$PATH</code></li></ul><p>Dev tips: the codebase is small—load it directly in Neovim and watch <code>:messages</code>/LSP logs; format with <code>stylua</code> (config included).</p><h2 id="zed" tabindex="-1">Zed <a class="header-anchor" href="#zed" aria-label="Permalink to &quot;Zed&quot;">​</a></h2><p>The Zed extension lives in <code>editors/zed</code> and uses Rust plus <code>zed_extension_api</code>.</p><p>Suggested local verification:</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:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> editors/zed</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">cargo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --release</span></span></code></pre></div><p>Then load the local extension per Zed&#39;s official guide (Zed CLI required). Make sure <code>clice</code> is on <code>PATH</code> before launching. Follow the Zed extension publishing flow when releasing.</p>`,23)])])}const u=e(t,[["render",l]]);export{k as __pageData,u as default};
