Language injections in JSON
Answered
Hello,
I've configured a few language injections but I just cannot figure out how to define a language - in this case VTL - for a JSON attribute. This type of scenario is quite common in the products I work with. I can manually assign an injection to an attribute value but it goes away when the file is closed. How can I configure IntelliJ to automatically assign a particular JSON property as containing an other language?
Any help appreciated. The JS language injections don't really seem to work.
Thanks,
gp
Please sign in to leave a comment.
Hello, there is no easy solution as the IDEA's built-in one is very simple. Usually this needs a plugin: https://plugins.jetbrains.com/docs/intellij/language-injection.html
A plugin made by me to inject all CDATA tags as HTML in plugin.xml and it's source code(you may ignore other classes):
https://plugins.jetbrains.com/plugin/14985-plug-in-devkit-helper
https://github.com/beansoft/visualgc_java8/blob/master/devkit-helper/resources/META-INF/plugin.xml#L75
If you need more info, please reply this thread.