Yaml Syntax Highlighting not working for Helm templates
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
Helm/go templates break the yaml syntax highlighting feature as you can see in the screenshot below.
Environment
Zed: v0.123.6 (Zed) OS: macOS 14.3.1 Memory: 16 GiB Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.
If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.
No response
This is a issue known issue https://github.com/ikatyang/tree-sitter-yaml/issues/36
You can enclose the template syntax in single quotes as a workaround
I understand, but it doesn't make sense all the time to enclose the template with quotes, for example:
{{- if .Values.serviceMonitorEnabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
...
{{- end }}
On VSCode it works as expected:
I want this new feature too. It would be greatly appreciated if you could prioritize its implementation in upcoming releases 👍
I want this new feature too. It would be greatly appreciated if you could prioritize its implementation in upcoming releases 👍
It appears to be an upstream issue according to https://github.com/zed-industries/zed/issues/8487#issuecomment-1966851220, so there's not much we can prioritise.
Relatively new Zed user here. Is there a way to tell Zed to ignore a subset of files? I added a helm chart to my project, and now I have 315 errors..., which makes it difficult to see my very real errors.
I believe that tree-sitter-go-template is the better approach, because they even support helm dialect: https://github.com/ngalaiko/tree-sitter-go-template/blob/master/dialects/helm
I tried to get helm language support added earlier this year here: https://github.com/zed-industries/zed/pull/7259
And I started a discussion for it here: https://github.com/zed-industries/zed/discussions/7260
Now, I'm just trying to get Helm supported via extensions: https://github.com/zed-industries/extensions/pull/443
@cabrinha Please let us now if you find out how to package this as an extension. Hopefully we can get this working.
I see there is a closed pull request for #7259 ending with
Going to close this for now, but it should be possible to package this as an extension. @ConradIrwin
As well as a new currently open issue at zed-industries/extensions/issues/186
Should we close this issue and follow up to the latter issue?
Finally I see that the business is going on at zed-industries/extensions/pull/746 but I can't unfortunately help at the moment.
@malikbenkirane https://github.com/zed-industries/extensions/issues/186 should stay open until the editor supports Helm.
https://github.com/zed-industries/extensions/pull/746 is where the business is going on, but I need some help with:
- Making sure Zed identifies certain
.yamlfiles as Helm and knows the difference and when to use Helm vs. YAML - Getting the CI tests to pass
- Making sure the language server is being used correctly