microsoft/compose-language-service

Docker Compose: Wrapping of Lines >80 characters

klongmitre opened this issue · 5 comments

I'm running into an issue where lines that are longer than 80 characters are automatically wrapped and indented and ignores other editor settings (e.g. wordWrapColumn, minimap.maxColumn, etc.). The only way that I can get the file to stop wrapping when formatted is to set docker.enableDockerComposeLanguageService to false, which kind of defeats the purpose. Is there a setting somewhere I'm overlooking that changes the auto-wrapping applied to files set to the dockercompose language?

Can you give a screenshot or example?

Sure...

With docker.enableDockerComposeLanguageService set to false:
image

With docker.enableDockerComposeLanguageService set to true:
image

In both conditions, the configured language setting is:
image

Thanks, I'll take a look.

@bwateratmsft - thanks for looking into this. Is this a configurable parameter?

No unfortunately 😞

Probably the easiest thing to do would be to disable formatting-on-save for Compose documents. In settings.json (user or workspace):

    "[dockercompose]": {
        "editor.formatOnSave": false,
    }

This way you can still use the rest of the language service features, without it messing up your formatting. Of course, that means formatting will have to be done manually (Shift+Alt+F), and when that is done this line wrapping will still happen.