microsoft/compose-language-service

More Opinionated spacings on formatting Compose file

ucheNkadiCode opened this issue · 3 comments

In this example, values under an attribute remain spaced out. I think that attribute names can remain spaced such as ports and volumes, but for the value under volumes, it should be thrown right under the volumes attribute

Can you describe what you mean? Again, I need to assert that if the user puts in extra whitespace, it is not our place to decide to undo that, even if we think it's in a weird spot.

Sorry I meant to post a picture. Since the user is opting to press Shift Alt F for the formatting help, I would expect that some spacing could be shifted into the way we suggest. They don't have to use our formatting, but I would hope we format Compose files in a way that people will want to use. So I'm proposing a few improvements here.

image

In this case I would want interval /n timeout to become interval-timeout with no spacing. However, I think between higher sections such as build and healthcheck, keeping that spacing would still be great

This is similar to #50 then and is asking for schema-aware formatting, which is just not feasible from a RoI perspective.