Skip to content
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

Syntax highlighting in yaml files #84

Closed
benjaminbosko opened this issue Feb 23, 2022 · 8 comments
Closed

Syntax highlighting in yaml files #84

benjaminbosko opened this issue Feb 23, 2022 · 8 comments

Comments

@benjaminbosko
Copy link

I would like to have the same syntax highlighting in yaml files opened in VS Code as for example in json files.
image
image

Thank you!

panoply added a commit that referenced this issue Sep 9, 2022
panoply added a commit that referenced this issue Sep 9, 2022
@panoply panoply added ⚡Enhancement New feature or request v3.0.0 labels Sep 25, 2022
@panoply
Copy link
Owner

panoply commented Sep 28, 2022

🚢 Shipping in v3.0.0

@panoply panoply closed this as completed Sep 28, 2022
@benjaminbosko
Copy link
Author

Thank you for the new release!
Is it possible to support yaml files without change its extension to .yaml.liquid? Unfortunately it is not an option for me.
Moreover I have to use quotes in many situations for templates. Could you apply the syntax highlighting to quoted strings as well?
image

@panoply
Copy link
Owner

panoply commented Sep 28, 2022

Hey @benjaminbosko,

So Yaml files will be highlighted using injections, so you don't need to use an extension - file.yaml will work no problems. I will have a look at support strings.

@panoply panoply reopened this Sep 28, 2022
@panoply
Copy link
Owner

panoply commented Sep 28, 2022

🚢 #103

Injections / highlights and no suffix extension all working. Hope it helps!

@panoply panoply closed this as completed Sep 28, 2022
@benjaminbosko
Copy link
Author

Sorry, but I I see no changes at all. Am I doing something wrong?

2.3.0
image
image
3.0.0
image
image
3.0.2
image
image
Disabled
image
image

Moreover it used to work with JSON files, but not in the newer versions.

2.3.0
image
3.0.2
image

@panoply
Copy link
Owner

panoply commented Sep 29, 2022

I am unable to recreate. Testing YAML files all pass:

Screenshot 2022-09-29 at 20 24 44

Have you got any other extensions active?

Moreover it used to work with JSON files, but not in the newer versions.

String encapsulated Liquid captures are not supported in JSON in v3.0 but create a new issue for that and I will look into it possibly reverting that change.

@panoply panoply reopened this Sep 29, 2022
@panoply panoply added ⚠️ Monitoring and removed ⚡Enhancement New feature or request v3.0.0 labels Sep 29, 2022
@benjaminbosko
Copy link
Author

benjaminbosko commented Sep 30, 2022

Thanks for your help, you were right! I disabled all my extension apart from Liquid and that way I figured out that the Jinja extension overwrote the behavior of Liquid. Now it is working fine:
image
However the syntax highlighting is not as advanced as in your case. I can live with that but may you know what configuration do I miss to have the same result as on your screenshot?

@panoply
Copy link
Owner

panoply commented Sep 30, 2022

No problems! The settings you have now will always work as intended. I will go ahead and close this one and address string injections in #109

@panoply panoply closed this as completed Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants