-
I am struggling to get prettier to work with anything. I don't know what is wrong. Here is what I tried:
helix 24.7 (91e642c) [[language]]
name = "yaml"
file-types = ["yaml", "yml"]
auto-format = true
formatter = { command = "prettier", args = ["--parser", "yaml"] }
[[language]]
name = "html"
file-types = ["html", "xml"]
auto-format = true
formatter = { command = "prettier" } |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I've got it to work with this [[language]]
name = "html"
file-types = ["html", "xml"]
auto-format = true
formatter = { command = "bash", args = [
"-c",
"prettier --stdin-filepath xx.html ",
] } For [[language]]
name = "yaml"
file-types = ["yaml", "yml"]
auto-format = true
formatter = { command = "bash", args = ["-c", " prettier --parser yaml "] }
[[language]]
name = "docker-compose"
file-types = ["docker-compose"]
auto-format = true
formatter = { command = "bash", args = ["-c", " prettier --parser yaml "] } Adding the file-type |
Beta Was this translation helpful? Give feedback.
-
I also ran into this issue and the |
Beta Was this translation helpful? Give feedback.
I've got it to work with this
For
yaml
this workedAdding the file-type
docker-compose
to file-types of yaml did not work. You have to specify it in the docker-compose language.