swayfmt
A tool for formatting Sway code according to style guidelines.
Quickstart
- To use
swayfmt, install the forc-fmt plugin using fuelup. - To contribute to
swayfmt, see CONTRIBUTING.
Configuration with swayfmt.toml
Swayfmt is meant to be configurable, however currently it only supports the default configuration options.
Note: Not all
Configoptions are guaranteed to work and most are not implemented. Configuration options are subject to change between versions without notice. If you would like to see a feature implemented, or implement a feature please refer to the CONTRIBUTING guide.
The default swayfmt.toml:
= 100
= false
= 4
= Auto
= Block
= 1
= Preserve
= Preserve
= Block
= true
= true
= false
= SameLineWhere
= 1
= 0
= true
= false
= Preserve
= AlwaysSameLine
= true
= false
= false
= Wide
= false
= false
= Never
= false
= Tall
= false
= Scaled
= true
= Off
= true
= false
= 80
= false