Comments (13)
Sorry for being late.
I implemented this in the devel
branch. (#97)
from minpac.
I also want this feature. https://github.com/l04m33/vlime needs a subdirectory for the rtp.
from minpac.
@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.
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.
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.
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.
In that case, minpac#clean()
will remove gocode
.
from minpac.
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.
Just run into this with both nginx and docker repos
from minpac.
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.
google/yapf is another example where the vim plugin is in a subdir
from minpac.
I too am having the same issue with https://github.com/l04m33/vlime.
from minpac.
Thanks for this @k-takata
from minpac.
Related Issues (20)
- Updating blocks for a while before showing window HOT 6
- Specify minpac#add defaults in minpac#init HOT 1
- Why is nocompatible required? HOT 9
- minpac#update() not working on Windows 10 + nvim 0.5.0 HOT 4
- minpac update progress window name "a" HOT 7
- Migrate CI to GitHub Actions
- How to setup denite ? HOT 2
- Inaccurate documentation of minpac#init() function HOT 2
- Changing subdir after installation has no effect
- minpac#update() alters 'cpo'
- buffer-local mappings not executed until timeout HOT 3
- Do not map <C-j> and <C-k> in status window
- [Question] using `confirm()` instead of `input()` in `minpac#clean()`
- minpac#update Not Working HOT 1
- `core.autocrlf`が`true`の場合vim-jp/vimdoc-jaのtags-jaファイルで衝突が起こる HOT 3
- Getting Error when trying to clean HOT 2
- What is a good way to check if a package is loaded? HOT 6
- maintained? HOT 6
- warning: minpac progress window not found. HOT 2
- WindowsにてVimパッケージインストール後のエラーメッセージ HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minpac.