When swift-mode:switch-case-offset is set equal to the basic offset, non-case lines following a case end up at the same indent level as the case itself, like so (both offsets are 4 for the example):
switch result {
case let .success(value):
print("Got \(value)!")
handleSuccess(value)
case let .failure(error):
print("Got an error: \(error)")
handleFailure(error)
}
The expected result is that the case line is indented, and then non-case lines "inside" it are also indented, by the basic offset.
switch result {
case let .success(value):
print("Got \(value)!")
handleSuccess(value)
case let .failure(error):
print("Got an error: \(error)")
handleFailure(error)
}
When
swift-mode:switch-case-offset
is set equal to the basic offset, non-case
lines following acase
end up at the same indent level as thecase
itself, like so (both offsets are 4 for the example):The expected result is that the
case
line is indented, and then non-case
lines "inside" it are also indented, by the basic offset.