-
Notifications
You must be signed in to change notification settings - Fork 0
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
Harshil alignment of inputs and outputs #71
Comments
That rule looks like a nightmare to implement. I hope to introduce a better syntax for process inputs/outputs as part of static types, that should make this formatting rule irrelevant, but that could take a while. Others are welcome to try: language-server/src/main/groovy/nextflow/lsp/services/script/ScriptFormattingProvider.java Lines 391 to 402 in ab8e4d5
|
That's what I was afraid of. @maxulysse pointed out that he'd rather the "space come after the comma" output:
- tuple val(meta), path("*.bam") , emit: bam
+ tuple val(meta), path("*.bam"), emit: bam
tuple val(meta), path("*.bais"), emit: bai
+ path "versions.yml", emit: versions
- path "versions.yml" , emit: versions So just align on the emits, and make the comma come directly after. I think that sounds easier to implement. Idk how the VS Code users have been doing it, but there's an Emacs function for it, and I think a Vim function, at least this plugin might give some ideas https://github.com/junegunn/vim-easy-align |
Spaces before comma is probably slightly easier I think the algorithm would be:
|
The Harshil Alignment expects the inputs and outputs to be aligned based on the
,
🙃This is what currently happens:
nf-core/modules@d134e78#diff-1ecd6f34cd082ae715c3861cfc6109fb379ff397cbb125dfe3cc7baa4ad22f59L15-R17
Docs: https://nf-co.re/docs/contributing/code_editors_and_styling/harshil_alignment#comma-example
The text was updated successfully, but these errors were encountered: