Leptos RSTML
Support for Leptos RSTML in Zed
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 Leptos RSTML. The extension's id is leptos.
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.
Leptos Extension for Zed
This extension adds support for the Leptos Rust web framework to the Zed editor. Primarily through syntax highlighting of rstml in Rust files.
Features
- Proper highlighting for Leptos template macros (
view!,html!, etc.) - Integration with rust-analyzer for comprehensive language support
Installation
- Open Zed
- Go to Settings > Extensions
- Search for "Leptos"
- Click "Install"
Usage
The extension activates automatically when editing .rs files that use Leptos macros. The RSX content within view macros will be properly highlighted:
fn app() -> impl IntoView {
view! {
<div class="container">
<h1>"Hello, Leptos!"</h1>
<p>"This syntax is properly highlighted"</p>
<Button on:click=move |_| { /* event handler */ }>
"Click me"
</Button>
</div>
}
}
About Leptos
Leptos is a full-stack, isomorphic Rust web framework that leverages fine-grained reactivity to build declarative user interfaces. Leptos allows you to write web applications entirely in Rust, with components that can run both on the server and in the browser.
Acknowledgments
This extension uses the tree-sitter-rstml grammar for parsing and highlighting RSTML/RSX syntax within Leptos macros.
License
Apache-2.0