Thanks @tera
That is what I have done for now, kept it in the same line.
Reason for asking was:
I was annotating @MainActor in 2 separate lines, so thought it would be nice to have nonisolated in 2 lines
Also the examples I saw in the presentations also contained nonisolated in a separate line, in my personal preference looked nicer. This is subjective, just stating my preference.
Questions:
Just wondering if most keep it in the same line or have it separate lines?
If many tend to use it in different lines could this be considered by the swift-format team to handle such cases?
I also tend to keep important attributes such as @MainActor on the same line as the type declaration. Why? Two reasons. 1) vertical space is more valuable than horizontal. 2) When a type is large and extends beyond the visible window, Xcode shows only a single-line sticky header. Having key type information in that header is very helpful; not seeing important attributes such as @MainActor is not.
Regardless of the desired formatting, this definitely seems like a bug, as indenting the struct line is nonsensical. I suggest you file a bug on swift-format.