Search code examples
intellij-ideaemmetlive-templates

IntelliJ & Emmet: How to reference live templates inside of other live templates


With Emmet, I can create a snippets.json file with custom Emmet abbreviations. For example:

"custom:icon": "link:favicon[href=\"img/favicon.ico\"]"

When I expand

custom:icon

It first reads the custom entry:

link:favicon[href=\"img/custom-favicon.ico\"]

Which, due to the 'link:' reference, will then expand into:

<link rel="shortcut icon" type="image/x-icon" href="custom-favicon.ico" />

However, when I add this custom abbreviation into IntelliJ's Live Templates and use it, it stops at the custom entry and doesn't expand the link tag per Emmet's rules. As a result, it displays:

link:favicon[href=\"img/custom-favicon.ico\"]

How do I get it to keep expanding the Emmet tags inside the custom Live Template?


Solution

  • "Nested" live templates are not supported; please follow IDEABKL-6832 for updates