Stylus
Stylus language support with Tree-sitter semantics, navigation, refactoring, completion, and diagnostics
How to install
With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.
You can also open the Extensions panel in the app and search for Stylus. The extension's id is stylus.
Don't have Forge Super yet? Download it here.
README
From the extension's repository, written by its authors and not by Mentenaz. See the source.
Stylus for Zed
Stylus language support for Zed, powered by a dedicated
Tree-sitter grammar and the stylus-lsp npm package.
Features
.styland.stylusfile detection- syntax highlighting, indentation, brackets, outline, and text objects
- snippets for common Stylus constructs
- semantic navigation, references, rename, completion, hover, colors, and diagnostics
- Stylus embeddings in Vue, Svelte, and Astro
- automatic language-server installation and updates through Zed
Development installation
Run zed: install dev extension and select the editors/zed directory, not the
monorepository root. Re-run zed: rebuild dev extension after changing the Rust
adapter or manifest.
Local language-server override
To test unpublished language-server changes, build the local package:
npm run build --workspace packages/language-server
Then add an absolute path to Zed's settings:
{
"lsp": {
"stylus-language-server": {
"binary": {
"path": "/absolute/path/to/stylus/packages/language-server/dist/server.js",
"arguments": ["--stdio"]
}
}
}
}
The adapter recognizes JavaScript overrides and still uses Zed's managed Node.js
binary. Remove binary to test the released package; the extension installs and
caches stylus-lsp automatically.
Project-specific aliases and include paths belong under the same server's
settings field. See the
language-server guide.
Marketplace packaging
When submitting the parent repository to zed-industries/extensions, use:
[stylus]
submodule = "extensions/stylus"
path = "editors/zed"
version = "0.6.2"
The extension path contains its own MIT license and never ships the language server source or build output.