How to configure forc-fmt/swayfmt

I’m trying to configure the rules for forc-fmt, I’ve dug through the code a bit and I see that I can create a file called swayfmt.toml, but I haven’t found any info about what I should put inside it.


Great question! Only the default configuration is supported right now, which is why there isn’t any documentation about this.

Hey Frank! In the config there should be options for just about everything rustfmt has to offer, except that we only implemented the default. If you don’t mind, which formatting options are you after? I can tentatively open an issue in the milestone and we can try to work it in for your project ASAP :slight_smile:

Hey, I was having an issue where if a line of code ended with a comment, the formatter would remove the newline after the code. I wanted to tweak the config to try to fix that.


msg_sender().unwrap(); // Comment