Code Monkey home page Code Monkey logo

Comments (13)

k-takata avatar k-takata commented on May 16, 2024 6

Sorry for being late.
I implemented this in the devel branch. (#97)

from minpac.

jgouly avatar jgouly commented on May 16, 2024 1

I also want this feature. https://github.com/l04m33/vlime needs a subdirectory for the rtp.

from minpac.

jsatk avatar jsatk commented on May 16, 2024 1

@k-takata I'd be willing to help add in the ability to set the runtimepath similar to how vim-Plug does it (mentioned here: #33 (comment)). Are you actively working on this? Or is this in progress in any way?

from minpac.

nelstrom avatar nelstrom commented on May 16, 2024

vim-plug has an rtp option which is useful in this scenario. e.g. you can use:

Plug 'nsf/gocode', { 'rtp': 'vim' }

That will check out the entire nsf/gocode repository, then set Vim's runtimepath to include the vim directory within that repository. I'm guessing that this approach won't work here, since minpac doesn't manage Vim's runtimepath.

To make this work for minpac, I think it would be necessary to only checkout the vim subdirectory of the repository. Apparently Git can do this using sparse checkouts.

from minpac.

k-takata avatar k-takata commented on May 16, 2024

Hmm, does sparse checkout strip directory structure?
I think it checks out only specified files/directories but the directory structure is kept.

One possible workaround is using another package and create a symlink in it.

mkdir -p ~/.vim/pack/bundle/start
cd ~/.vim/pack
ln -s minpac/start/gocode/vim bundle/start/gocode

(not tested)

from minpac.

nelstrom avatar nelstrom commented on May 16, 2024

You're right about sparse checkout: it does maintain the directory structure of the original repo. My mistake!

The symlink idea makes sense. I suppose you could get away with putting both the full repository and the symlink in the same package? e.g.:

cd ~/.vim/pack/minpac/start
git clone https://github.com/nsf/gocode.git gocode-full
ln -s gocode-full/vim gocode

Here, I'm using gocode-full as the name of the full repository, and gocode as the name for the symlink to the vim subdirectory within.

from minpac.

k-takata avatar k-takata commented on May 16, 2024

In that case, minpac#clean() will remove gocode.

from minpac.

nelstrom avatar nelstrom commented on May 16, 2024

Oh yeah, I hadn't thought of that.

I was wondering whether you might consider adding an option to minpac#add() so that you could do something like this?

call minpac#add('nsf/gocode', { 'subdir': 'vim' })

I'm not sure if subdir is the right choice of name for that key, but you get the idea. (The rtp option used by vim-plug and vundle would be a misnomer here) If a plugin is registered with this option, it would become a special case when running minpac#update() (and potentially also when running minpac#clean()).

Is it worth adding all of that extra code just to handle these special cases? I'm not sure, especially since examples like sonph/onehalf and nsf/gocode are uncommon. Alternatively, it might be worthwhile adding something to the documentation to describe how to install these kinds of plugin using minpac. If that's your preferred option, I can help.

from minpac.

cilindrox avatar cilindrox commented on May 16, 2024

Just run into this with both nginx and docker repos

from minpac.

tregusti avatar tregusti commented on May 16, 2024

Isn't it possible to only change the dir to clone into to a special dir for "full" repos, and then just symlink the dir option value.

mkdir -p ~/.vim/pack/minpac/full
cd ~/.vim/pack/minpac/full
git clone https://github.com/nsf/gocode.git
cd ~/.vim/pack/minpac/start
ln -s ../full/gocode gocode

from minpac.

lodagro avatar lodagro commented on May 16, 2024

google/yapf is another example where the vim plugin is in a subdir

from minpac.

jsatk avatar jsatk commented on May 16, 2024

I too am having the same issue with https://github.com/l04m33/vlime.

from minpac.

cilindrox avatar cilindrox commented on May 16, 2024

Thanks for this @k-takata

from minpac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.