mrjosh / helm-ls

⎈ Language server for Helm ⎈
MIT License
239 stars 15 forks source link

Support template context with variables #84

Closed qvalentin closed 4 months ago

qvalentin commented 6 months ago

The following won't work for hover, completion, etc. since the symbol table does not resolve variables that store the template context,

{{- $root := . -}}
{{- range $type, $config := $root.Values.deployments }}
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app-{{ $type }}
spec:
  replicas: {{ $config.hpa.minReplicas }}
---
{{- end }}
qvalentin commented 4 months ago

Fixed in https://github.com/mrjosh/helm-ls/releases/tag/v0.0.18