Joshua JLIVE Williams
Joshua JLIVE Williams

Reputation: 144

Emmet and EJS for atom not working

I've recently took advantage of the github student developer package from github and download Atom.io. I've been liking the features of it so far mainly the syntax highlighting that for ejs files as im learning node. However for some reason emmet doesn't work with ejs. I tried looking online but i didn't see anything.

if i type ul>li*3 + [tab] or from what ive seen ctrl+e that should give me

<ul>
    <li></li>
    <li></li>
    <li></li>
</ul>

but its just creating space. when i press ctrl+e it brings up "find in current buffer"

the file association with .ejs files is "Javascript Template" as im using the language/ejs package. Any help on how to fix?

Upvotes: 2

Views: 3058

Answers (1)

t_takaai
t_takaai

Reputation: 44

You may configure the settings as follows:

  1. Settings -> Packages -> emmet -> Settings
  2. See "Extensions Path" (default is ~/emmet).
  3. Place a file named "snippets.json" in the extensions path directory.

snippets.json :

{
    "ejs": {
        "filters": "ejs",
        "extends": "html",
        "profile": "xml"
    }
}
  1. Reboot your atom editor.

If you use the package "language-ejs", it will not function.

Upvotes: 2

Related Questions