Closed LisonFan closed 5 months ago
For the compose document, it looks like the YAML language extension is not registering itself as a formatter for documents with the dockercompose
language ID. Can you file an issue in their repository for that? It is intentional that the Docker extension disables its own formatter if the YAML extension is installed, because they frankly have a better formatter.
As for the Dockerfiles, you don't have the file saved yet, and it appears that VSCode does not let you format files of some languages until the file has been saved. For example, I was able to format a JSON document before saving the file, but not a Go, Java, or Python file. If you save the document the formatter should work.
External issue: https://github.com/redhat-developer/vscode-yaml/issues/1000
Hello,
I've encountered a compatibility issue with the Docker extension when the YAML extension is also installed in VSCode.
Issue Description
Once the YAML extension is installed, the Docker extension (ms-azuretools.vscode-docker) seems to lose its ability to format
docker-compose.yaml
andDockerfile
. The error message displayed is: "No formatter installed for 'dockerfile/dockercompose' files." This problem arises specifically after the installation of the YAML extension, indicating a potential conflict.Steps to Reproduce
docker-compose.yaml
orDockerfile
.Environment
1.85.1
macOS
Windows
v1.28.0
v1.14.0
Additional Context
It appears to be a conflict between the Docker and YAML extensions within VSCode, affecting the file formatting capabilities. Any insights or solutions to resolve this would be greatly appreciated.
Thank you for your assistance in addressing this issue.