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

Feature Request: Improved Formatting for Long Tuple Definitions #84

Open
exai-sukh opened this issue Dec 2, 2024 · 0 comments
Open
Labels
formatting Related to automatic code formatting

Comments

@exai-sukh
Copy link

exai-sukh commented Dec 2, 2024

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)
@bentsherman bentsherman transferred this issue from nextflow-io/vscode-language-nextflow Dec 4, 2024
@bentsherman bentsherman added the formatting Related to automatic code formatting label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatting Related to automatic code formatting
Projects
None yet
Development

No branches or pull requests

2 participants