Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set indent for '[' and '(' braces #191

Closed
zSOLz opened this issue Mar 16, 2018 · 2 comments
Closed

Set indent for '[' and '(' braces #191

zSOLz opened this issue Mar 16, 2018 · 2 comments

Comments

@zSOLz
Copy link

zSOLz commented Mar 16, 2018

It would be perfect to have native-like Obj-C formatting for arrays, dictionaries and conditions like this:

    let x = ["one",
             "two",
             "three"]

    let x = ["one" : "one-v",
             "two" : "two-v",
             "three" : "three-v"]
    
    let x = (one ||
             two ||
             three)

instead of:

    let x = ["one",
        "two",
        "three"]

    let x = ["one": "one",
        "two": "one",
        "three": "one"]

    let x = (one ||
        two ||
        three)

Of course if you are using newline, it should format the code as it was before:

    let x = [
        "one",
        "two",
        "three"
    ]

    let x = [
        "one": "one-v",
        "two": "two-v",
        "three": "three-v"]

    // Here is a little formatting bug afer Swimat:
    let x = (
        one ||
            two ||
            three
    )

As well it could be be customizable in options. BTW I can try to implement it.

@zSOLz
Copy link
Author

zSOLz commented Mar 19, 2018

Okay, I implemented formatting I want to have but I have no access permissions to push my branch to this repo. If you want I can push the improvement to let you finish it but there is some bugs left: It's not so easy to fix them because by fixing it I'm braking something else.

@Jintin
Copy link
Owner

Jintin commented May 6, 2018

You can open a pr for it. we can discuss there.
Sorry about the late response.

@Jintin Jintin closed this as completed in a01fbcd Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants