mirror of
https://github.com/helix-editor/helix
synced 2026-03-07 08:41:40 +01:00
Docker bake files are primarily written in `hcl`, but you can also write it in `json` and `yaml`. The official material and documentation for the feature uses `hcl`, which is why this commit makes the choice of associating the `docker-bake` language with `docker-bake.hcl` files. The primary motivation of this specialization is to inject the `dockerfile` language into the `dockerfile-inline` attribute.
24 lines
678 B
Scheme
24 lines
678 B
Scheme
((comment) @injection.content
|
|
(#set! injection.language "comment"))
|
|
|
|
; https://docs.docker.com/build/bake/reference/#targetdockerfile-inline
|
|
(block
|
|
(identifier) @_target (#eq? @_target "target")
|
|
(body
|
|
(attribute
|
|
(identifier) @_attr (#eq? @_attr "dockerfile-inline")
|
|
(expression
|
|
(template_expr
|
|
(heredoc_template
|
|
(template_literal) @injection.content)))))
|
|
(#set! injection.language "dockerfile"))
|
|
|
|
(function_call
|
|
(identifier) @_name (#eq? @_name "regex")
|
|
(function_arguments
|
|
(expression
|
|
(literal_value
|
|
(string_lit
|
|
(template_literal) @injection.content))))
|
|
(#set! injection.language "regex"))
|