ScottyB / ac-js2

Javascript auto-completion in Emacs using Js2-mode's parser and Skewer-mode.
123 stars 8 forks source link

Request: split company support out into a separate package #16

Open purcell opened 10 years ago

purcell commented 10 years ago

auto-complete and company are alternatives to each other, so it doesn't really make sense to support both in ac-js2. For a start, the reference to company-* symbols causes byte-compilation warnings on systems which don't have company installed, which simply wouldn't be present if you could (require 'company). The naming is also confusing, because I doubt any company users would expect an ac-* package to be useful to them.

As a result, I'd strongly suggest splitting out a separate company-js2.el in either the same repo or a fresh one, which would then form a separate easy-to-find and logically-named package in MELPA.

ScottyB commented 10 years ago

ac-js2 also has some navigation commands that don't really belong to an auto-complete or a company package either. I'll separate that out into something like a js2-utils then both completion frontends can depend on that.

purcell commented 10 years ago

Perhaps you could even get them added upstream if they're widely useful? @mooz appears to be actively maintaining js2-mode and accepting pull requests.

ScottyB commented 10 years ago

Good idea. I've issued a pr for the navigation component https://github.com/mooz/js2-mode/pull/159.

I'm planning on creating three packages: a completion package js-complete and two frontends, ac-js-complete and company-js-complete. With regards to melpa would it be better to create a single new repository for these packages or rename this one?

purcell commented 10 years ago

If you're targeting js2-mode, wouldn't js2-complete etc be clearer than js-complete? And the -complete suffix in ac-js-complete and company-js-complete is redundant: just call them ac-js(2) and company-js(2).

As far as MELPA's concerned, you can organise them however you want. My suggestion would be to use the current repo, and add js2-complete.el to it. Rename the repo to js2-complete or similar: github will redirect everything, so MELPA will be unaffected. Then you can make ac-js2.el depend on the js2-complete package, fixing up the MELPA recipe(s) accordingly. And also add company-js2.el at your leisure, of course.