Background
Xcode format automatically aligns && operators in multi-line Equatable implementations for better readability:
xcode format
struct Test: Equatable {
let a: String
let b: String
let c: String
let d: String
public static func == (lhs: Test, rhs: Test) -> Bool {
lhs.a == rhs.a &&
lhs.b == rhs.b &&
lhs.c == rhs.c
}
}
However, using swiftformat --indent doesn't apply this alignment
swiftformat --indent
struct Test: Equatable {
let a: String
let b: String
let c: String
let d: String
public static func == (lhs: Test, rhs: Test) -> Bool {
lhs.a == rhs.a &&
lhs.b == rhs.b &&
lhs.c == rhs.c
}
}
Question
Is there a way to configure swiftformat to align && operators in a way that matches Xcode format? If not, are there recommended workarounds or is this a potential feature for future updates?
Background Xcode format automatically aligns && operators in multi-line Equatable implementations for better readability:
xcode format
However, using swiftformat --indent doesn't apply this alignment
swiftformat --indent
Question
Is there a way to configure swiftformat to align && operators in a way that matches Xcode format? If not, are there recommended workarounds or is this a potential feature for future updates?