I'm using a comma in a Go template action
metadata:
name: {{ $route.name }}-route
annotations:
konghq.com/strip-path: {{ default true $route.stripPath | quote }}
{{- if ne (len $route.plugins) 0 }}
{{- $pluginsString := join "," $route.plugins }}
konghq.com/plugins: {{ $pluginsString | quote }}
{{- end }}
This is what my syntax highlight looks like:
And then that "error"/"broken syntax" then propagates to the rest of the file, basically showing everything with the same color, which is very annoying.
Is there a way to prevent commas from breaking the syntax highlight in VS Code?
Installing the Kubernetes extension on VS Code adds Intellisense on Helm charts and templates.
Language Mode of .yaml
file will be auto-detected as helm-template
in the bottom right of the screen :