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

Support for deciding if empty lines should be added when formatting .spec files. #2693

Closed
jensakejohansson opened this issue Feb 3, 2025 · 0 comments

Comments

@jensakejohansson
Copy link
Contributor

Hi!

I have never been a fan of the empty lines that the formatter adds when formatting my spec-files. Especially the ones added before tables:

Image

I'd like to control that myself. I understand that this might seem like a small thing that only annoys me, but still, can't help but suggest an implementation where one can toggle whether new lines should be added during formatting (around tags, and before tables).

I suggest a flag '--skip-empty-line-insertions' on the format command:

Image

As well as a settings in VSC, since at least I do 99% of formatting in VSC.

Image

Default (if setting is omitted or false) will of course be the "normal" behavior.

I've created the code from the best of abilities (I'm no Go-developer, nor I have understood the gauge implementation in full).

@sriv I would appreciate if you at least look at the PR:

#2692

I can understand the argument of not wanting to add complexity for solving a "non-issue", but still ;)

To make it work in VSC a small update for the extension is needed that sends the settings to the Gauge server, (otherwise default behavior will always be used), that code is ready if this would be considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant