yaml-language-server
yaml-language-server copied to clipboard
Support for .tpf (Helm chart Yaml-based template files)
It seems like Helm Chart files are basically Kubernetes yaml files with templating capability in {{...}}
blocks.
It would be nice if Yaml Language Server could provide support for those files (by pre-setting schema, allowing validation/completion in {{...}}
and so on.
What is needed for this to be added - how we can help? There is https://github.com/Azure/vscode-kubernetes-tools/blob/master/syntaxes/helm.tmLanguage.json which VSCode uses to correctly highlight Helm template syntax.
There seems to be a tree-sitter grammar for go templates. It might be useful here.
With tree-sitter and this grammar, the template blocks can be fully parsed into an AST that could be used for functionality beyond highlighting, such as diagnostics, autocomplete, etc.
https://github.com/ngalaiko/tree-sitter-go-template
It would be nice to make this work with templates in general and not just helm templates, {{...}}
is the default delimiter set but it can be customised, and we also have Jinja and ERB....
Just revisiting after nearly a year. Any new solutions or workarounds? @luisdavim any thoughts?
Would be nice to see this feature.