Open RafalSkolasinski opened 1 year ago
I did it in this way:
"[yaml]": {
"editor.defaultFormatter": "kennylong.kubernetes-yaml-formatter",
"editor.formatOnSave": true
},
"files.associations": {
"*.yml": "yaml",
"*.yaml": "yaml"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
Hi!
Sorry for the delay.
I use helm very often. But since helm is not really yaml but a template-engine we cannot format the mixed two directly.
However, for the template part you can use builtin function like indentn
.
for the yaml part, the new v2 version has implemented a range format, so just select range code and the extension will format those region.
You can config with(which is the default value):
"[helm]": {
"editor.defaultFormatter": "kennylong.kubernetes-yaml-formatter",
"editor.formatOnSave": false
},
"[ansible]": {
"editor.defaultFormatter": "kennylong.kubernetes-yaml-formatter",
"editor.formatOnSave": false
}
This is great, finally sane indent for list in Kubernetes / Ansible yaml files. Just a question - how can I make it also work if file is recognized as
helm-template
?I tried to set
but VS Code still complains that "There is no formatter for 'helm' files installed.".