Uses the built in Rust analyzer to auto-format your Leptos code. You can invoke command palette command with Leptos Init to generate the override command on your .vscode/settings.json file.
For Complex Project , and you dont want to override fmt on workspace level, and avoid pulluting override command on other projects.
You can invoke command palette command with Format with Leptosfmt or bind it to a key.
Demo
Requirements
Rust: Ensure you have Rust installed on your machine.
Leptosfmt: This extension requires leptosfmt. Install it using:
cargo install leptosfmt
Using built in Rust Analyzer (rust-lang.rust-analyzer)
Press Ctrl+Shift+P to open the command palette.
Type Leptos Init to any Leptos project.
Note: it would generate this on `.vscode/settings.json`