-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(README): add combined injections #11
base: master
Are you sure you want to change the base?
Conversation
I also added the injections file, we need to check if adding it in the queries directory makes it usable without manually adding it. |
I think I found a case where this does not work correctly: {{ if .Values }}
- name: {{ .Chart.Name }}-{{ $variable }}
image: "test"
{{- end }}
the yaml after Can we fix this? Edit: I guess i know, why this is not working, correct me if I'm wrong. - name: -
image: "test" With the combined injections, this will break the yaml highlighting for the rest of the file, the old option would only break one line. Other than that I can confirm that this fixes the issues described in #3, so #10 would not be needed anymore. |
@qvalentin I just tinkered around with this myself and it can be fixed by quoting the value like so: - name: "{{ .Chart.Name }}-{{ $variable }}" That should be good practice anyway and won't risk breaking the generated yaml, if the template values evaluate to whitespace. |
I'm also fine with merging this, I just wanted to point out what I noticed. |
Did I just find another case? I can't really explain this one. spec:
triggers:
- type: prometheus
metadata:
query: sum(rate(http_requests_total{deployment="my-deployment"}[2m]))
quer: test
broken: highlight |
the |
This is expected and not an issue. |
@baptman21 lets merge this, it is also already included in https://github.com/nvim-treesitter/nvim-treesitter like this already. |
Following #4 , we only need injections with the
combined
option to get a better result, this should fix most render issues, maybe even the ones in #10 but this needs to be checked.In the mean time this injection gives a better render.