mattmcmanus / atom-ember-snippets

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

Support ember-decorators package's import statements #54

Open axyxnz opened 5 years ago

axyxnz commented 5 years ago

Hey,

As Ember marketing team is generating buzz around Ember Octane Edition, many users are trying out Ember's new features. It would be awesome to allow users autocomplete ember-decorators's import statements to make user's experience better.

Ember Decorators API Documentation: https://ember-decorators.github.io/ember-decorators/

Module Import File
component import { ... } from '@ember-decorators/component' import-ember-decorators-component.cson
controller import { ... } from '@ember-decorators/controller' import-ember-decorators-controller.cson
data import { ... } from '@ember-decorators/data' import-ember-decorators-data.cson
object import { ... } from '@ember-decorators/object' import-ember-decorators-object.cson
object/computed import { ... } from '@ember-decorators/object/computed' import-ember-decorators-object/-omputed.cson
service import { ... } from '@ember-decorators/service' import-ember-decorators-service.cson

i.e.

snippets/import-ember-decorators-object.cson

'Ember.object.computed':
  'prefix': 'imdeccomputed',
  'leftLabelHTML': '<span style="color:#EDAE49">Ember Decorators module</span>',
  'body': "import { className } from '@ember-decorators/component;'"

If you are okay with supporting ember-decorators's import statements in this plugin, I can send you PR.

mattmcmanus commented 5 years ago

Hey @axyxnz, thanks for this! I've been hesitant to include addon snippets in this package, as there is already a ton of imports already. Do you know if the ember-decorators package will become part of the default blueprint in octane?

jrock2004 commented 5 years ago

Yes, decorators will be

axyxnz commented 5 years ago

Yes, ember-decorators package will become part of Octante blueprint. However, import statements' from value might change.

As a developer, I would like to install a single atom plugin that enables autocompleting feature for Ember ecosystem (Ember, Ember Data, Ember-Glimmer integration, etc.). Finding and installing atom plugins to figure out which one autocompletes what is kind of annoying.

I am not sure whether you would want this plugin to be that plugin that supports Ember ecosystem. If that's not what you imagined to be future of this plugin, feel free to close this issue.

mattmcmanus commented 5 years ago

@axyxnz That's helpful. I'm fine with adding default blueprint addons. I've been hesitant to add other ones. This addon introduces enough snippets as it is and I want to make sure they're all as applicable as possible.

I'll try to get this merged in tomorrow.

axyxnz commented 5 years ago

Don't merge yet. I made few changes in local but I have not updated PR yet. I'll update PR tomorrow and verify all import statements. Thanks.

manoharank commented 4 years ago

@mattmcmanus @axyxnz Any update?