How to inject a language from a TextMate bundle into HTML?
I have a Textmate bundle (https://github.com/addisonhall/antlers-statamic-sublime-syntax) I want to use within the existing PHPStorm HTML files. I would like all the existing features of HTML to continue working and just use these additional tags and syntax with it. What is best way to do this? Language Injection, Live Templates, etc???
Please sign in to leave a comment.
textmate bundle can't be injected as a language; and live templates can only be used for generating code, they don't affect code recognition. if you have some custom tags you'd like to be recognized, the only way to let phpStorm know about these custom tags is adding them to the exception list of the
Unknown HTML taginspection... You don't need doing it manually, just hit Alt+Enter on highlighted tag and then choose to add it to custom tags list - see screenshot. No errors will be reported for these tags then, and they will be available in completion.Also, you can try developing your own language plugin for this - see http://www.jetbrains.org/intellij/sdk/docs/reference_guide/custom_language_support.html
I am gettin getting mostly the "Unresolved variable or type xxxxx" inspection errors. How do I fix these? Is there a way to add the double bars {{ }} so anything in them is allowed?

Also getting a lot of the "expression expected"
PhpStorm likely injects JavaScript in `{{}}` - such interpolations are used by many supported frameworks. If no frameworks are enabled for project, text within `{{}}` is treated as simple string