-
Notifications
You must be signed in to change notification settings - Fork 35
Description
This pr: rust-lang/rust-analyzer#17058 adds support for project based rust-analyzer configuration file.
Adding the below section to rust-analyzer.toml in any leptos project you want to format with leptosfmt:
[rustfmt]
overrideCommand = ["leptosfmt", "--stdin", "--rustfmt"]
does in my experience make rust-analyzer use leptosfmt for formatting my specific setup is based on neovim, so not sure if it integrates with other editors.
Not sure if its stable enough to document it as a way to have our editors run leptosfmt. As can be noted in the referenced pr:
We don't promise any stability with this feature yet, any configs exposed may be removed again, the grouping may change etc.
If you feel like its a worthwhile addition to the readme regardless of its stability I could attempt a pr with documentation. For this I suppose I would have to find out under what setups this works with, (calling out to any readers, if you can figure out if this feature is available under your setup it would be awesome)