EmberExperts / ember-snippets

All-in-one snippets for Ember apps. Forget about syntax, focus on development.
https://marketplace.visualstudio.com/items?itemName=exelord.ember-snippets
5 stars 1 forks source link

Filtering commands by Ember version/setting #3

Closed chrism closed 4 years ago

chrism commented 4 years ago

I find this extension so useful but one thing I find is that I often add the wrong method for the version of Ember I am using.

For example. init adds

init() {
  this._super(...arguments);

},

whereas with Octane I would have liked to have added the other init() ie

init() {
  super.init(...arguments);

}

Realise this is entirely my fault but I was wondering if there is there a clever way to tie these commands to the version of Ember I am using to reduce this problem?

Exelord commented 4 years ago

VScode does not give an option for that unfortunately :/ But, you can use smart snippets suggestions and teach vscode which snippets you want to use as suggested. Then the not used will be sorted as last.

chrism commented 4 years ago

Hi thanks for the explanation thats a shame—will try teaching it via the smart snippets 👍