justinmahar / SublimeCSAutocompletePlus

CoffeeScript autocompletions and more!
172 stars 12 forks source link

Multiple custom type definition files #22

Open Iristyle opened 11 years ago

Iristyle commented 11 years ago

Have you given any thought to allowing custom type definitions to be found in multiple files?

Rather than loading just CoffeeComplete Plus Custom Types.sublime-settings ... it would be nice to load some based on a pattern, or provide a hash in the setting specifying which files can be loaded.

As I flesh out all the AngularJS type defs, I think it would be nice to ship files like CoffeeComplete Plus Custom Types - jQuery.sublime-settings, CoffeeComplete Plus Custom Types - AngularJS.sublime-settings, CoffeeComplete Plus Custom Types - Ember.sublime-settings, etc.

Like package control, it would then be useful to specify which of these are loaded in the CoffeeComplete Plus.sublime-settings, via something like an enabled array.

That way these various completions could be a bit better organized. As it stands, with just a single file, I have to take all the existing jQuery completions, and add all the Angular ones to the same file, and put them in my user dir as an extended CoffeeComplete Plus Custom Types.sublime-settings. This makes it painful if you ever ship fixes to the jQuery one for instance.

Food for thought... IMHO, it would improve the maintenance quite a bit.

I'm also happy to pass along my AngularJS completions... but... I think it would be better if this feature would be implemented so users could opt-in to just the completions they need. (Even better would be a setting that could be stored in the .sublime-project specifying settings that apply to just the current project that would override the globals. This is what we do with SublimeLinter).