Extract Vim plugin
Most plugin managers in Vim clone the repository. This repository — as at today — sits at 678MB.
$ du -hd 1 | sort -h
8.0K ./contrib
8.0K ./deps
16K ./nix
36K ./editor-support
36K ./scripts
36K ./unison-share-projects-api
44K ./yaks
56K ./.github
104K ./unison-hashing-v2
116K ./unison-syntax
248K ./docs
348K ./unison-core
356K ./unison-share-api
376K ./scheme-libs
512K ./lib
732K ./codebase2
1.6M ./unison-cli
2.2M ./parser-typechecker
4.4M ./unison-src
668M ./.git
680M .
This is a bit large to bring in for Vim editor support which is only 24K of the 36K of editor-support.
Recommendation
- create a new repository, "unison.vim" — the same way you have vscode-unison
- lift-and-shift editor-support/vim into "unison.vim"
- enjoy a lighter editor
@igbanam there was some discussion of this in #3002. As I said there, I'm not opposed to the vim support moving into another repo, but is your vim plugin manager actually doing a full clone? I would expect them to do a shallow clone. A shallow clone is currently 15MB for this repo which is still large for a vim plugin but much smaller than 680M.
I think that you could get a much smaller download size with a combination of filter and sparse-checkout, but admittedly that's complicated and I wouldn't expect package managers to do that.
Anyway now that the repo is up to 15M even for a shallow checkout I think that this is probably something that should be done. I just wanted to check in on whether the current situation is as bad as a 680M clone in practice.
As at the time I sent this, 680M was the result of du -hd 1 inside the plugin repository.
I have to looked into the intricacies of vim-plug — there's probably a way to configure it to default to shallow clones. For now, it gets the entire work tree.
fwiw:
149M --bare
161M (normal)
14M --depth 1
I'm not a vim user, but it looks also like vim-plug checks out shallow by default
This may be the case when you install the plugin, but when you :PlugUpdate, it pulls the repo — this is how it gets updates to the plugin.