TIL: WebStorm's Language Injection

TIL: WebStorm's Language Injection

TIL: WebStorm can inject programming language into any string.

A month ago, I was working on Web Component. I had to write a component fragment as a string in order to reuse it. The problem is writing a programming language as a string is so annoying because it lacks of any IDE assistant such as auto indentation, auto-complete, code format, etc.

Until I found that Intellij-family IDE can inject a specific language into a string. It allow you to use IDE abilities on the string as same as you working on an actual source code including syntax highlighting, code format, or auto suggestion.

Full document of Language Injection: https://www.jetbrains.com/.../using-language-injections.html