Super for Zed
Zed extension for the .super files of the Super framework:
syntax highlighting, errors, completion, hover, go to definition and formatting.
Extension id: super-lang. It declares the "Super" language and starts its language server,
@super-ts/language-server.
.super files have their own language, so vtsls (Zed's TypeScript server) does not see them.
Installing
From Zed's extension registry: Extensions panel, search "Super".
How the server is found
- A binary set in the settings (
lsp.super-language-server.binary) takes precedence. - Otherwise the extension reads the version of
@super-ts/langin the open project (node_modules/@super-ts/lang/package.json) and installs@super-ts/language-serverat that version from npm, so the editor and the compiler agree. A project without Super gets the latest version. - The server (
dist/server.js) runs with Zed's Node.
Settings
The server binary can be forced, as for any Zed server:
{ "lsp": { "super-language-server": { "binary": { "path": "node", "arguments": ["…/server.js", "--stdio"] } } } }The Super repository uses this setting to run the server from its sources.
Grammar
super-ts/tree-sitter-super, compiled by Zed at the
rev set in extension.toml.
Developing
- Rust, through rustup (Zed compiles the extension with it), then restart Zed so it finds
cargo. - In Zed: command palette,
zed: install dev extension, then pick this folder. Zed compiles the extension and the grammar (the first time, allow a minute). After a change: Rebuild in the extensions panel.
The CI builds the extension for wasm32-wasip2 on every change. In the Super repository, this
extension is mounted as a submodule in editors/zed.
Releases
Versions follow the Conventional Commits on main:
release-please keeps a release pull request open,
with the next version in extension.toml and Cargo.toml and the new CHANGELOG.md entries.
Merging it creates the vX.Y.Z tag and the GitHub release; the new version is then submitted to
Zed's extension registry.