You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining tuples with multiple elements, the current formatter outputs all elements on a single line. This can be difficult to read, especially when there are many elements, making the code less readable.
Introduce formatting rules that break tuple definitions into multiple lines when the total length or the number of elements exceeds a threshold. Ideally, this threshold is configurable.
I don't know what auto-formatting would do to it, but the following is already possible in nextflow and at the least is not reformatted by the extension on my VSCode:
Normally, function calls will be wrapped across multiple lines if you add a trailing comma. But this behavior doesn't apply to directives. Might be a good idea to make it consistent though.
@awgymer the formatter will definitely reformat that tuple input to a single line. it may be that the formatter is just doing nothing, which can happen if there are syntax errors. I should probably show a message to the user when that happens.
Current Behavior
When defining tuples with multiple elements, the current formatter outputs all elements on a single line. This can be difficult to read, especially when there are many elements, making the code less readable.
Current Formatting Example:
input: tuple val(the), val(nextflow), val(formatter), val(is), val(great), val(because), val(it), val(ensures), val(consistent), val(and), val(clean), val(syntax)
Proposed Improvement
Introduce formatting rules that break tuple definitions into multiple lines when the total length or the number of elements exceeds a threshold. Ideally, this threshold is configurable.
Proposed Formatting Example:
input: tuple val(the), val(nextflow), val(formatter), val(is), val(great), val(because), val(it), val(ensures), val(consistent), val(and), val(clean), val(syntax)
The text was updated successfully, but these errors were encountered: