paq-nvim icon indicating copy to clipboard operation
paq-nvim copied to clipboard

Proposal: ability to specify subdirectory containing vim plugin

Open rcoconnor opened this issue 4 years ago • 2 comments

Some color schemes have their vim plugins within a subdirectory of the repo. For instance, vim plug has the rtp option, which allows you to specify the subdirectory containing the vim plugin.

rcoconnor avatar Jul 19 '21 13:07 rcoconnor

This seems to be a duplicate of #10.

bR3iN avatar Jul 21 '21 15:07 bR3iN

This seems to be a duplicate of #10.

I read #10, but I found another method for this, maybe also work in Windows?

https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository/52269934#52269934

nanozuki avatar Aug 17 '21 03:08 nanozuki

Duplicate of #10

savq avatar Aug 03 '23 20:08 savq

I figured out a workaround for this that works for my use cases.

First, install the main repository with some as = alias, then symlink or copy/install the desired subdirectory to the desired location using build =. Example:

require("paq") {

p {"vlime/vlime", as = "_vlime", build = "ln -fnrs vim ../vlime"}

}

You could use install or rsync here instead of ln, as desired. Note also that ln on Mac doesn't support -r (unless you install the GNU version), and of course this doesn't work on Windows.

(I know that this isn't actually necessary for Vlime anymore, but it's the first example I came up with).

As for the broader use case, would you be open to a patch that implements a subdir = option using git sparse-checkout? No manual runtimepath modification would be needed in that case.

gwerbin avatar Dec 25 '23 05:12 gwerbin