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

2.0 upgrade add spaces in ranges #26

Closed
romainourgorry opened this issue Nov 29, 2024 · 4 comments
Closed

2.0 upgrade add spaces in ranges #26

romainourgorry opened this issue Nov 29, 2024 · 4 comments

Comments

@romainourgorry
Copy link

Hello,

First of all thank you for this nice formatter which format my list as I want (not like prettier)

Between version 1.1.0 and 2.0.0 you added the range formatter, is it possible to disable it?

With 1.1.0
valid_http_versions: [ "HTTP/1.1", "HTTP/2.0" ]

With 2.0.0
valid_http_versions: [ "HTTP/1.1", "HTTP/2.0" ]

I don't want to add the space at the beginning and the end of the range.

Thank you in advance for your answer

@longkai
Copy link
Owner

longkai commented Nov 30, 2024

hello,

Range formatter only works when you select a range of code.

And the v2 version will only add one space at the beginning and the end.

What you want is ["HTTP/1.1", "HTTP/2.0"]?

@romainourgorry
Copy link
Author

Hello,

Yes this is exactly what I would like to do

@longkai longkai closed this as completed in 0c8b42c Dec 3, 2024
@longkai
Copy link
Owner

longkai commented Dec 3, 2024

Hello, the version 2.4.0 has been released which contains a new option better-yaml.flowCollectionPadding which default to true.

Set to false will give you that result.

@romainourgorry
Copy link
Author

Thank you very much, it works perfectly.

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

No branches or pull requests

2 participants