jansorg / swift-plugin

Space of the Swift language support plugin for JetBrains IDEs
41 stars 0 forks source link

Formatter #4

Open jansorg opened 1 year ago

jansorg commented 1 year ago

Request for Feedback

Please share your thoughts and ideas about the best experience for a Swift source code formatter.

kvenn commented 1 year ago

I would LOVE if this package supported formatting.

https://github.com/nicklockwood/SwiftFormat

That appears to be the easiest to achieve it. It would be great if there was a "format on save" option. As well as if IntelliJ picked it up as a formatter so I could run it on a full file.

I'd personally say the more opinionated the better. But would also make sense if it supported having an optional configuration file if you wanted to configure it: https://github.com/nicklockwood/SwiftFormat (or bonus - if you could do this from IntelliJ settings).

Apple has their own, which I'd be fine with as well: https://github.com/apple/swift-format

kvenn commented 11 months ago

I've set up the File Watcher plugin with SwiftFormat to automatically format my files on save.

image