Closed Shatur closed 4 years ago
Sure, why not.
@Shatur95 I introduced packager#plugins()
and packager#plugin(plugin_name)
functions. Just make sure to call PackagerInit
function before trying them, to populate the plugins list and add packager to runtime.
I didn't document it yet, will wait for your feedback.
Thanks! Could you add also something like packager#plugin_names()
? I think this can me more common case.
You have the name for each plugin here. Just map it out for yourself however you need it.
Of course, but getting all information is a bit slow. It would be nice to have the ability to get only names and then get information about specific plugin.
Yeah, it's a bit slower because it needs to do some git calls to fetch all the data.
I added packager#plugin_names()
that returns only list of names.
Thank you, now much faster!
I wrote the following helper for myself, maybe someone will find it useful:
function! OpenPackageFolder(plugin_name)
if has('win32')
let program = 'start '
else
let program = 'xdg-open '
endif
call system(program . packager#plugin(a:plugin_name).dir)
endfunction
function! FzfPackages()
call PackagerInit()
call fzf#run(fzf#wrap({'source': packager#plugin_names(), 'sink': function('OpenPackageFolder')}))
endfunction
Minpack have
minpac#getpluglist
andminpac#getpluginfo
. In very convenient for scripting. Could you add a the same API?