Skip to content
MegalithOfficialPublic

About

Zig toolchain management and ZLS integration for Zed, inspired by vscode-zig.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Zinc

Zig toolchain management and ZLS integration for Zed.

Features

  • Auto-install Zig and ZLS with minisign verification
  • ZLS configuration passthrough via Zed lsp.zls settings
  • Zig language definition + Tree-sitter queries
  • Zig run/test tasks and debug locators
  • Works with Zig release and dev builds

Tasks

  • "Zinc: Refresh toolchain cache" creates a .zinc-refresh marker in the worktree. Restart ZLS to apply.

Extension settings

This extension reads its configuration from Zed’s lsp.zls.settings under a zinc_zig object:

{
  "lsp": {
    "zls": {
      "settings": {
        "zinc_zig": {
          "zig_path": "/path/to/zig",
          "zig_version": "0.14.1",
          "zls_path": "/path/to/zls",
          "zls_enabled": "on"
        }
      }
    }
  }
}

Notes:

  • zig_path mirrors zig.path from the VS Code Zig extension.
  • zig_version mirrors zig.version and overrides .zigversion / build.zig.zon.
  • zls_path mirrors zig.zls.path from the VS Code Zig extension.
  • zls_enabled: on or off (defaults to auto-install if unset).

ZLS runtime settings should go directly under lsp.zls.settings (e.g. zig_exe_path, inlay hints, etc.).

Capabilities

To allow downloads and command execution, enable these capabilities in Zed:

{
  "granted_extension_capabilities": [
    { "kind": "process:exec", "command": "*", "args": ["version"] },
    { "kind": "process:exec", "command": "*", "args": ["--version"] },
    { "kind": "download_file", "host": "*", "path": ["**"] }
  ]
}

Development

Install as a dev extension from this repo root. Build requires Rust via rustup.

About

Zig toolchain management and ZLS integration for Zed, inspired by vscode-zig.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages