darron / language-ejs

EJS support for Atom.
Apache License 2.0
14 stars 7 forks source link

Emmet and language-ejs problem #15

Open tludlow opened 7 years ago

tludlow commented 7 years ago

I can't use tab autocomplete for html (with emmet) when i have this package installed.

Repomn commented 7 years ago

I had the same problem. Try to add following codes to use emmet with ejs. It's only useful until next update.

~/emmet/snippets.json This is extension file of emmet. Create this file if you don't have.

{
  "ejs": {
    "extends": "html"
  }
}

~/.atom/packages/language-ejs/grammars/javascript template.cson

// last line
'scopeName': 'text.html.ejs'

keymap.cson

'atom-text-editor[data-grammar="text html ejs"]:not([mini])':
  'tab': 'emmet:expand-abbreviation-with-tab'

Good luck!

joinjoohny commented 7 years ago

not working for me (: Atom 1.13.1

Repomn commented 7 years ago

@joinjoohny I'm using the same version Atom 1.13.1 on win10/64bit. language-ejs 0.4.0, emmet 2.4.3

Try another code. ~/.atom/packages/language-ejs/settings/language-ejs.cson

'.text.html.ejs':
  'editor':
    'commentStart': '<%# '
    'commentEnd': '%>'

Open config about emmet package. Add this code to your file "Extensions Path" as top level property

  "ejs": {
    "extends": "html"
  }

good luck

ghost commented 3 years ago

I know this was years ago, but I've been fighting with this issue and also getting language-ejs to autocomplete class names like:

<div class="container">

This is the only thing that fixed it! I hope there's an update for this package soon. I use EJS all the time.