Skip to content

how to disable or get the commands for the docker-compose.yml formatter #3602

Answered by bwateratmsft
dantuck asked this question in Q&A
Discussion options

You must be logged in to vote

Converting this to a discussion as that seems to fit better.

The formatter is in the Compose language service. You can disable it with this setting, either in your .vscode/settings.json or in user settings:

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

I'm not aware of any way to use VSCode language servers as a precommit hook or CI check. Ultimately this particular formatter is just parsing it in with the yaml library and rewriting it with a certain number of spaces for indentation; one could create an executable NPM script / package to do the same.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dantuck
Comment options

@bwateratmsft
Comment options

Answer selected by dantuck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3601 on August 17, 2022 20:17.