Closed danny-huang-openfind closed 1 year ago
Hi @danny-huang-openfind
As long as the files are suffixed with *.hcl
- and, obviously, the language is HCL-based - which seems to be the case for the Docker Bake build files, then it's supported.
It's worth noting though that the features this extension provides are more limited compared to what you might expect. It provides primarily static syntax highlighting and nothing else and the limited feature set is mostly intentional.
We might add some product-agnostic formatting as per https://github.com/hashicorp/vscode-hcl/issues/98
The reasoning behind it is the difference between languages built on HCL (such as Terraform, Packer, Nomad, Docker Bake and others) which you can read more about at https://github.com/hashicorp/syntax#hcl-vs-terraform--packer--
Features like completion, hover, go-to-definition etc. only make sense for the languages built on top of HCL, rather than HCL itself. It is therefore expected that these would be implemented as part of dedicated VS Code extensions, hence we maintain the Terraform extension intentionally separately. So applying the same logic, someone could build an extension dedicated to Docker Bake which provides those features. We do not intend to do that ourselves but we plan to maintain some libraries to help with that and make it easier to do so. Some early efforts are in https://github.com/hashicorp/hcl-lang and https://github.com/hashicorp/syntax
I hope that helps answer your question.
Just a quick ask, is this extension support to the format of which docker buildx's configuration is using? https://docs.docker.com/build/bake/configuring-build/
Since this extension looks like the most popular extension for HCL files on vscode, I hope it can support to buildx.