Format on Save
For anyone wanting to format on save this is what I did. It's a bit janky but it works well. ⤵
- To get started pick out a formatter for Xcode. I'd recommend SwiftFormat but here's a list of a bunch of them and other handy extensions.
- Once you have a formatter picked out assign it a hotkey in Xcode that's not taken such as
CMD + ~
- Then download a shortcut mapper such as BetterTouchTool.
- In your shortcut mapper simply setup
CMD + S
for Xcode and set it to actually use your shortcut you set for your fomatter. Like this ⤵