nicklockwood / SwiftFormat

A command-line tool and Xcode Extension for formatting Swift code
MIT License
7.93k stars 640 forks source link

Space around colon #1168

Open hugovanderlei opened 2 years ago

hugovanderlei commented 2 years ago

is there a way to add space around colon in class, struct, enums declarations?

after format I get:

struct NotificationsRequest: RequestProtocol

I would prefer to use:

struct NotificationsRequest : RequestProtocol

nicklockwood commented 2 years ago

This isn't currently supported I'm afraid.

facumenzella commented 1 year ago

Happy to work on a spaceAroundColon rule for classes, structs, and enums. Is anybody working on it? cc @hugovanderlei @nicklockwood ?

nicklockwood commented 1 year ago

Nobody is working on it afaik. It should probably be a config option for the spaceAroundOperators rule rather than a new rule.