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.
leptosfmt
. Install it using:cargo install leptosfmt
Ctrl+Shift+P
to open the command palette.Leptos Init
to any Leptos project.Ctrl+Shift+P
to open the command palette.Keyboard Shortcuts
to open the keyboard shortcuts settings.leptos-fmt.format
leptos
leptos-fmt.path
and set it to the path of your leptosfmt
binary leptos-fmt.cargoHome
and set it to the path of your cargo
home directory