You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: