Zi Language for VS Code

Editor support for the new Zi runtime (the tao tree): ziran.toml projects, TypeScript/TSX sources, .zx module images, and the zi command line. VS Code keeps its built-in TypeScript language for .ts/.tsx; this extension adds the parts the compiler owns instead.

Commands

All commands look for the nearest ziran.toml (or tao.toml) above the active file, then across the workspace, and ask which project to use when several exist.

  • Zi: Build runs zi build <manifest> and reports compiler errors (path:line: message) in Problems.
  • Zi: Run runs zi run <manifest> in a terminal; the native window opens from that terminal.
  • Zi: Web Preview runs zi web <manifest>, serves the generated build/web folder on a local port, and opens it in the Simple Browser (falls back to the system browser when Simple Browser is unavailable).

The ▶ button in the editor title bar runs the project of the open manifest.

Zi Module editor

Opening any .zx image shows what the module actually contains: its id, kind (app or library), image version, size, sha256, and the module prefix's imports (with their kind: app, library or wildcard) and exports (with arity, visibility and code size). The editor never invents text for binary content.

Import completions

Inside a project, extension-less imports such as import { twice } from "ziran/math" complete the module ids declared by the project manifest.

Settings

  • zi.command: path to the zi command. Empty finds a checkout's build/zi (or build/tao in older trees) above the manifest or beside the workspace, then ~/.local/bin/zi, then PATH.

Development

npm ci                # install dependencies pinned by package-lock.json
npm test              # unit suite: node --test tests/*.test.mjs
npm run package       # vsce package

Version lives in package.json and is bumped with ./update_version.sh. Release: GitHub Actions uploads a VSIX from every build; maintainers publish with the workflow's Run workflow button and Publish GitHub Release. Install locally: code --install-extension ziran-language-*.vsix.

S
Description
Ziran language support for VS Code with import completion and definition navigation.
Readme MIT
1.9 MiB
0 Stars 1 Watchers 0 Forks
No results found.
Languages
JavaScript 97.6%
Shell 2.4%