Open patrick-steele-idem opened 9 years ago
Marko is now my de-facto JS template and I'll be glad to have emmet support it. +1 on this request !
:+1:
I like the idea. You can extend Emmet in run-time, see https://github.com/emmetio/emmet/blob/master/lib/emmet.js#L171
The only thing you have to do is to expose emmet
object in package: https://github.com/emmetio/emmet-atom/blob/master/lib/emmet.coffee#L124
About keyboard shortcuts: you can add 'tab': 'emmet:expand-abbreviation-with-tab'
shortcut into your packages’ keymap file. But I don’t know how Atom will behave if there’s no Emmet plugin installed
Thanks, @sergeche, for the pointers. So it looks like a good solution would be to update emmet-atom
to export a reference to the internal emmet
module. I could then update the language-marko
package to get a reference to the instance of the emmet-atom
package to register the additional Emmet snippets.
As for keyboard shortcuts, I will try out adding 'tab': 'emmet:expand-abbreviation-with-tab'
and see how that goes.
Sound like a good plan? If so, I'll plan on sending a PR to export the emmet
module.
Thanks again for your help.
Marko is an HTML-based templating language that extends the HTML grammar and we have an Atom package to support the Marko templating language: https://atom.io/packages/language-marko
I would like to be able to provide automatic support for Emmet when using Marko (Marko just extends HTML), but currently that does not seem to be possible. Specifically, I would like to be able to enable the following:
To overcome this problems I had to manually update my local
~/emmet/snippets.json
file to include additional Marko snippets. In addition, I had to manually update mykeymap.cson
to include the following:Having to ask every developer to do these steps is problematic and unreliable. Is there a better solution?
Thanks in advance.