limetext/lime — pull request #281 by ZiDoMs (2014-05-14 09:43:46+00:00)
Title: New approach for lime package management

This is a suggestion for lime package managing.
For now we have these package types:
* Settings
* Keybindings
* Syntaxes
* Plugins
* Themes

Each of them will be a type implementing `Package interface`, The init function will be responsible for scanning paths, finding packages and keeping the [hierarchical priority](http://docs.sublimetext.info/en/sublime-text-3/customization/settings.html#order-of-precedence-of-sublime-settings-files)
For each Package type the `Get()` method will be responsible for returning useful data that we will need for adding that package for example for a Plugin it might be returning python files or for a Setting returning the the data in the settings file, The important point is we won't load the package we just will prepare it for loading the package it would be something like this:
Settings
```go
for _, setting range packages["settings"] {
loaders.LoadJSON(setting.Get(), e.Settings())
}
```
Or Plugins
```go
for _, plugin range packages["plugins"] {
for _, f range plugin.Get(){
s, err := py.NewUnicode(plugin.Path() + "." + f.Name()[:len(f.Name())-3])
m.Base().CallMethodObjArgs("reload_plugin", s)
}
}
```
If this approach is fine i will continue committing to this branch until it's done.