Skip to content

Indentation for SwiftUI modifiers is incorrect #152

@joeldrotleff

Description

@joeldrotleff

Here is the default Xcode-generated indentation for some SwiftUI code:

NavigationStack {
    CoolView()
        .padding(10)
}
.padding(12)

Note that the first ".padding" example is indented while the second is not. So this seems like a tricky case.

Using swift.vim auto-indent I get:

NavigationStack {
    CoolView()
    .padding(10)
}
.padding(12)

So the second ".padding" is correctly not indented, but the first should be indented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions