mattmcmanus / atom-ember-snippets

Ember.js ES6 snippets for Atom
https://atom.io/packages/ember-snippets
MIT License
38 stars 22 forks source link

How do I use these snippets? #18

Closed jdhines closed 7 years ago

jdhines commented 7 years ago

In installed the package, both through apm and in-tool, restarted Atom twice, but still am not getting say the eachelse snippet to pop up in an .hbs file.

I've tried with the language set to HTMLBars and Ember HTMLBars.

mattmcmanus commented 7 years ago

@jdhines Wierd! Things seem to be working fine for me. Let me do some digging

mattmcmanus commented 7 years ago

@jdhines is it all of the snippets or just the handlebars ones?

jdhines commented 7 years ago

Seems to be just the handlebars ones

mattmcmanus commented 7 years ago

I just pushed 2.0.1 which may fix it. Let me know!

jdhines commented 7 years ago

What language do you have set? I upgraded and restarted Atom, but the template snippets still won't show up.

mattmcmanus commented 7 years ago

It was originally .text.handlebars and I updated it to .text.html.handlebars. Do you have the atom-handlebars package installed? When I open up an hbs file, the language type is set to HTML (Handlebars)

jdhines commented 7 years ago

I tried switching to HTML (Mustache), but I don't have a handlebars one. I installed the language-ember-htmlbars package

mattmcmanus commented 7 years ago

I'd definitely recommend atom-handlebars over language-ember-htmlbars. htmlbars in ember did not introduce any new language semantics that isn't already supported in the handlebars package. The only way this package can support both is to duplicate all the snippets with different sources or be less precise and risk having handlebars snippets being suggested in vanilla html.

jdhines commented 7 years ago

Switching to atom-handlebars solved the problem. Thank you. Maybe a disclaimer in the README to suggest using atom-handlebars? Or do you think most people using ember will be using that already? I know that for me, having just switched to Atom, the ember-handlebars package just made sense.

mattmcmanus commented 7 years ago

@jdhines Sorry for the run around. I've had in the bottom of the readme "Recommend Packages" but clearly I didn't realize that the way I have things setup makes that package an explicit dependency. I'll see if I can declare it as such