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

Suggestion: add option for first parameter to be on same line #18

Open
orchetect opened this issue Jul 9, 2022 · 6 comments
Open

Suggestion: add option for first parameter to be on same line #18

orchetect opened this issue Jul 9, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@orchetect
Copy link
Contributor

orchetect commented Jul 9, 2022

While I am actually a fan of Multiliner's current formatting behavior, some people might prefer not having a line-break between the method name and the first parameter.

Current Behavior

func sendAppStatus(
    to toNodes: [Node],
    name: String?,
    bundleID: String,
    state: Int32,
    isDockApp: Bool
) {
    // ...
}

Proposed opt-in behavior (as a preference)

First parameter starts on the same line, and closing parens trails immediately after the last parameter.

func sendAppStatus(to toNodes: [Node],
                   name: String?,
                   bundleID: String,
                   state: Int32,
                   isDockApp: Bool) {
    // ...
}
@aheze
Copy link
Owner

aheze commented Jul 9, 2022

EWWWWWWWWWWWWWWWW

@aheze
Copy link
Owner

aheze commented Jul 9, 2022

But sure, I'll add a preference. Need to figure out how to share data between the main app and the extension though...

@aheze aheze added the enhancement New feature or request label Jul 9, 2022
@orchetect
Copy link
Contributor Author

I hate it too, just looking out for others 😎

@orchetect
Copy link
Contributor Author

I can foresee some other options being added in future so wouldn't be a bad idea to figure it out. And another reason why unit tests will become increasingly useful if more options get added.

@vitalyverkash
Copy link

Just wanted to create the same suggestion but it already exists. Only one clarification - not only the first parameter shouldn't be on a separate line, but also the closing round bracket.

With the current implementation we will get this formatting:

ClickableCard(
    image: "",
    title: "",
    value: "",
    action: { }
)

My proposition to have an option for this:

ClickableCard(image: "",
              title: "",
              value: "",
              action: { })

@orchetect
Copy link
Contributor Author

My proposition to have an option for this:

ClickableCard(image: "",
              title: "",
              value: "",
              action: { })

That's what my example already shows but I can amend the request wording to be explicit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants