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

Question: how to combine Yaml + Jinja2 languages? #13

Closed
max-arnold opened this issue Oct 9, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@max-arnold
Copy link

commented Oct 9, 2018

Both SaltStack and Ansible use Yaml + Jinja2 to describe configurations. Is it possible to combine these editors in LiClipseText for specific file extension?

@fabioz

This comment has been minimized.

Copy link
Owner

commented Oct 9, 2018

Hi Max,

In theory yes, that should be possible... it should be mostly a matter of combining the definition of both as needed (although that may require some fiddling around with the related files).

As a reference, the jinja2 and yaml definitions used are:

https://github.com/fabioz/LiClipseText/blob/master/plugins/org.brainwy.liclipsetext.editor/languages/jinja2.liclipse
https://github.com/fabioz/LiClipseText/blob/master/plugins/org.brainwy.liclipsetext.editor/languages/yaml.liclipse

There are some instructions at http://www.liclipse.com/text/supported_languages.html on how to create your own .liclipse file.

It should also be possible to embed one inside the other. For instance, mako embeds python (see: https://github.com/fabioz/LiClipseText/blob/fa7860088569a8e024fd42ba7a8ce053ac7ac1c9/plugins/org.brainwy.liclipsetext.editor/languages/mako.liclipse -- in particular, search for SwitchLanguageRule there).

@max-arnold

This comment has been minimized.

Copy link
Author

commented Oct 14, 2018

Thank you Fabio!

@max-arnold max-arnold closed this Oct 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.