Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Kimi ExtensionNew to Visual Studio Code? Get it now.
Kimi Extension

Kimi Extension

archi-Doc

| (0) | Free
Kimi language diagnostics, build, run, and check commands for Visual Studio Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Kimi Extension

The kimi-ext extension provides diagnostics and build/run/check commands. It shares the compiler and toolchain described in this README.

QuickStart

  1. Install .NET 10, Node.js LTS and VS Code 1.138 or later (1.x). From the repository root, build the compiler and prepare the toolchain for native builds:

    dotnet build src/Kimi/Kimi.csproj -c Release
    ./src/backend/windows-x64/setup.ps1 -LlvmBin 'C:/path/to/LLVM/bin'
    

    Use src/Kimi/bin/Release/net10.0/Kimi.exe with its accompanying files. Diagnostics and Check need no LLVM tools. Standalone installations keep toolchain/ beside the executable, or set KIMI_TOOLCHAIN_ROOT before starting VS Code.

  2. Package and install the extension from the repository root:

    ./scripts/install-extension.ps1
    

    The script runs build-extension.ps1, then installs artifacts/packages/kimi-ext.vsix using the VS Code code CLI on PATH. Use -CodeCommand 'C:/path/to/VS Code/bin/code.cmd' for another installation, or -ExtensionsDirectory 'C:/path/to/test-extensions' for an isolated extension directory. Run ./scripts/build-extension.ps1 when only a VSIX is needed. Both scripts keep the current version; locked npm dependencies include the packaging tool. Packaging compiles the extension and includes this section and the root MIT license. After updating, run Developer: Reload Window in VS Code.

  3. Run Preferences: Open User Settings (JSON) and set your actual compiler path:

    {
      "kimi.serverPath": "C:/path/to/Kimigayo/src/Kimi/bin/Release/net10.0/Kimi.exe",
      "kimi.runBuilds": true
    }
    

    Current Kimi builds sources in run, so enable kimi.runBuilds to avoid a separate build. Leave it false only for older executables whose run requires an existing build.

  4. Open a trusted source folder and a saved .kimi or .kimiproj. Press Ctrl+F5 or F1 > Kimi: Build and Run. If asked, choose Kimi (Run Without Debugging). An unambiguous target runs without a picker; .kimiproj is optional. Diagnostics appear in the editor and Problems panel.

Commands and targets

With the settings above:

F1 command Action
Kimi: Build Save inputs and build.
Kimi: Run / Build and Run Save inputs, then invoke kimi run once to build and run.
Kimi: Check Save inputs and check without building.
Kimi: Select Target and ... Choose a target explicitly for any of the four actions.

Palette commands and Ctrl+F5 prefer the active .kimiproj, then a project beside the active source, then a project in the active editor's workspace folder. Without an active folder, all workspace folders and open project tabs are candidates. One project is selected automatically; multiple projects show a picker. With no project, the active saved .kimi is used. Outside-workspace sources search only their own directory. Select Target and ... always allows a manual choice or Browse; no selection is remembered.

The editor play button and Kimi context menus use the clicked file exactly. A single .kimi includes only that source. Build and Run keeps one target throughout execution.

Output and input use task terminals. Stop / Shift+F5 stops a Ctrl+F5 session; Tasks: Terminate Task stops palette tasks. Commands sharing a target directory cannot overlap. Execution is supported; breakpoints, stepping and application arguments are not.

Ctrl+F5 needs no launch.json. If another language's configuration is selected, choose a Kimi: Build and Run configuration instead. Its optional program accepts an exact .kimi or .kimiproj path, ${file}, or a path relative to its workspace folder. Omit it for automatic selection.

Settings and troubleshooting

  • kimi.serverPath: absolute executable path or a name on PATH, without arguments. Invalid paths and server errors offer Open Settings and Show Output once per unchanged setting during an extension session, shared by diagnostics and build/run/check commands. Repeated failures remain in the Kimi Output channel. Changing the setting allows a new notification and restarts the server; Kimi: Restart Language Server retries the same setting without repeating the popup. A failed connection does not automatically restart in a loop.
  • kimi.runBuilds: enable for current Kimi. The compatibility default is false, which uses build then run for Build and Run and leaves Run's behavior to the executable.
  • kimi.trace.server: off (default), messages, or verbose; see the Kimi Output channel.

Before compilation, the extension saves the selected source, or all dirty open Kimi files for a project. Untitled files are skipped. VS Code separately saves editors through its task/debug settings; task.saveBeforeRun: "never" disables task-wide saving for all extensions.

Tasks need an open folder; diagnostics also work in standalone editor windows. Avoid % in native build paths with the verified Windows linker. Completion, hover, navigation and syntax highlighting are not included. Kimi.exe manages the toolchain.

VS Code 1.139.1 can emit DEP0169 (url.parse()) from its own CLI marketplace metadata request after installing a local VSIX (upstream issue). This is outside the extension; the install script preserves the warning while awaiting an upstream fix.

The vsce 4.0.0 message that extension.js is large means that this one file accounts for more than 85% of the unpacked package, not that it exceeds an absolute size limit. A minified single bundle naturally dominates this small VSIX (about 97 KB compressed). Keep the bundle; splitting it or adding filler only to change this ratio would not improve loading or download size.

Extension development

Run from the repository root:

npm --prefix src/kimi-ext ci
npm --prefix src/kimi-ext test
$env:KIMI_TEST_SERVER_PATH = (Resolve-Path src/Kimi/bin/Release/net10.0/Kimi.exe).Path
npm --prefix src/kimi-ext run test:integration

Integration tests use isolated VS Code profiles. Set VSCODE_EXECUTABLE_PATH to reuse an installed VS Code; otherwise the test runner downloads it. Compiler-dependent cases are skipped without KIMI_TEST_SERVER_PATH. Open this repository and select Kimi Extension in Run and Debug to launch its development host.

The npm override for Mocha selects supported glob 13 while @vscode/test-cli still depends on Mocha 11. Keep integration tests passing when updating this override, and remove it when the upstream dependency no longer selects deprecated glob 10. Packaging uses the locally installed, locked @vscode/vsce rather than an independent npx download. The prepublish step bundles the extension and its runtime dependencies with esbuild, retaining license notices; the VSIX excludes tests, build tools and node_modules.

Edit this README section and the root LICENSE; packaging generates ignored copies under src/kimi-ext/. For a new release, run npm --prefix src/kimi-ext run version:patch once (updates the package and lockfile without a Git tag), update src/kimi-ext/CHANGELOG.md, test and package with npm --prefix src/kimi-ext run package. Only the final number increments automatically; major/minor changes require explicit user instruction. See maintenance rules.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft