CreateSean
CreateSean

Reputation: 1386

Atom editor - emmet set language

I just started using Atom editor after switching from Sublime Text 3. I'm having a couple of issues though and one of them is that I have emmet installed but the files I'm using have sytax highlighting set for ExpressionEngine or Craft-Twig not html and this is stopping the emmet shortcuts from working.

Is there a way to set emmet to expand html with syntax highlighting other than html.

so for example:

section>ul.list-inline>(li>a>lorem2)*3 and hit tab expands to:

<section>
  <ul class="list-inline">
    <li><a href="">Lorem ipsum.</a></li>
    <li><a href="">Quasi, nihil.</a></li>
    <li><a href="">Nam, nobis.</a></li>
  </ul>
</section>

This works if I set the file to html, but I want it to work when set to expressionengine or craft-twig. I had it working like this when using Sublime Text.

Upvotes: 0

Views: 303

Answers (1)

idleberg
idleberg

Reputation: 12882

You should be able to use extend the snippets, as it's currently done for JSX. The following is taken from snippets.json:

"jsx": {
    "filters": "jsx, html",
    "extends": "html",
    "profile": "xml"
}

Check the snippets documentation for details.

Upvotes: 1

Related Questions