minpac icon indicating copy to clipboard operation
minpac copied to clipboard

Supporting local paths?

Open gfontenot opened this issue 6 years ago • 7 comments

Any chance of supporting local paths in addition to git/github urls? This is super useful for package development, as well as necessary for using packages like fzf.vim, which needs to load a local file:

" using vim-plug
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim'

AFAICT, this isn't currently possible with minpac. Please let me know if I'm mistaken!

gfontenot avatar Jul 06 '17 19:07 gfontenot

I don't think it's useful., because minpac doesn't manage runtime path. Isn't it enough to modify the runtime path directly? E.g.:

set rtp+=/usr/local/opt/fzf

Or, if you put a plugin under the package directory, you don't need to modify rtp. Vim will do it automatically.

k-takata avatar Jul 06 '17 23:07 k-takata

I think the best solution for fzf is add it in your runtime, just as @k-takata suggested:

" Load FZF from homebrew installation
set runtimepath^=/usr/local/opt/fzf
runtime plugin/fzf.vim

kassio avatar Jul 10 '17 09:07 kassio

Ah, good to know! I guess the only thing that might be missing is automatic documentation generation? Or does minpac just generate all documentation every time you launch?

gfontenot avatar Jul 10 '17 13:07 gfontenot

To generate help tags files, using :helptags ALL would be the easiest way. Minpac generates tags files only when minpac#update() is called and if plugins are newly installed or updated.

k-takata avatar Jul 11 '17 03:07 k-takata

I have been using symbolic links, but recently it caused some problems in NeoVim. I need to isolate that problem and create issue. However till today it worked perfectly.

hauleth avatar Dec 11 '17 13:12 hauleth

See: https://github.com/junegunn/vim-plug/issues/34 for why you shouldn't ^= the rtp. Also consider that after/ has to be manually added for these packages, and that it should be grouped alongside the other pieces of the rtp.

To manage this, you should therefore:

  • Split rtp by the first path ending with /after
  • Add your new path at the end of the first part of the split
  • Add newpath/after to the second section, preferably the end. However, vim-plug retains the last of the rtp as well as the first, so potentially a split on , should be done, and the newpath/after inserted at second-to-last.

This becomes non-trivial. It may be that a separate plugin can manage the rtp for you however.


I poked around the source, I think the big thing would just be giving each plugin it's own command. The default being git clone ... but symbolic links being ln -s … (if indeed that works).

Then there could be some checksum system in place to determine whether it had changed. This is a good follow-up from https://github.com/k-takata/minpac/pull/46 perhaps.

SevereOverfl0w avatar Jul 01 '18 10:07 SevereOverfl0w

You can also symlink the plugin directory under pack/custom or something like that. I don't know what issue @hauleth (back in 2017) was having but it works for me.

averms avatar Sep 15 '20 18:09 averms