Files
openidea/languages/helm-template.toml
T
Deng Liuanddengliu 4d88d44616 feat(language): add a Helm Template language for chart templates (#3261)
Files in a Helm chart's templates folder (yaml, yml, tpl, txt under a Chart.yaml / Chart.yml root) and *.gotmpl files are detected as Helm Template instead of YAML or plain text. They contain Go text/template + Sprig actions that are not valid YAML until rendered, so the YAML language server, formatter and tree-sitter syntax check no longer attach to them and flood the editor with errors.

A CodeMirror stream mode highlights YAML outside {{ … }} and keywords, variables, dot paths, functions and comments (including {{- /* … */ -}}) inside. .tpl outside a chart keeps its current type, since Smarty, Terraform and other engines use it too.

Co-authored-by: dengliu <5108773+dengliu@users.noreply.github.com>
2026-11-14 10:46:56 +08:00

17 lines
616 B
TOML

id = "helm-template"
name = "Helm Template"
# `.tpl` is Smarty, Terraform and other template engines too: only charts claim it (below).
extensions = ["gotmpl"]
line-comment = "#"
block-comment = ["{{/*", "*/}}"]
indent = { tab-size = 2, insert-spaces = true }
ui-mode = "Helm Template"
# Helm charts: YAML, template and notes files in a `templates` folder.
# No YAML formatter or strict YAML language server: Go `{{ … }}` actions are
# not valid YAML until rendered by `helm template`.
[[framework-files]]
folder = "templates"
extensions = ["yaml", "yml", "tpl", "txt"]
root-markers = ["Chart.yaml", "Chart.yml"]