Skip to content

When switch case statements are fully indented, following lines are not at all #166

@woolsweater

Description

@woolsweater

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) }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions