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

Docker Compose: Wrapping of Lines >80 characters #70

Closed
klongmitre opened this issue Dec 7, 2021 · 5 comments · Fixed by #71
Closed

Docker Compose: Wrapping of Lines >80 characters #70

klongmitre opened this issue Dec 7, 2021 · 5 comments · Fixed by #71
Labels
bug Something isn't working

Comments

@klongmitre
Copy link

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?

@bwateratmsft
Copy link
Contributor

Can you give a screenshot or example?

@bwateratmsft bwateratmsft added the needs more info This issue needs more information label Dec 7, 2021
@klongmitre
Copy link
Author

Sure...

With docker.enableDockerComposeLanguageService set to false:
image

With docker.enableDockerComposeLanguageService set to true:
image

In both conditions, the configured language setting is:
image

@bwateratmsft
Copy link
Contributor

Thanks, I'll take a look.

@bwateratmsft bwateratmsft added bug Something isn't working and removed needs more info This issue needs more information labels Dec 7, 2021
@klongmitre
Copy link
Author

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

@bwateratmsft
Copy link
Contributor

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.

@microsoft microsoft locked and limited conversation to collaborators Jan 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants