TL;DR: Is there a way to have
straight.el not check out a package via git repo, and have it download slim melpa packages like
package.el does? Also, is there a way to have it refrain from automatically downloading a lesser-used package until I manually tell it to?
I'm trying to switch to
package.el because reproducible configs and seamless integration of non-MELPA packages sound very attractive. I've added the bootstrap code to
(straight-use-package 'use-package), and put
:straight t on all
use-packages. Unfortunately, this makes
straight.el pull eeeeeverything from git repos. This creates two problems:
~/.emacs.dhas inflated from 82MB to 2.4GB and counting. I cannot afford this much storage on one of my laptops, especially considering that 99% of that storage is wasted: I'm never going to hack on most of those packages!
- The initial checkout takes forever. When I said "and counting", I meant it's been taking about 30 minutes just to check out a single package, and there are a dozen more. It's currently stuck on
mozc, which is a 78KB single-file elisp program living in a gargantuan C++ project.
straight.elis trying to pull the whole 1GB+ repo so I can get access to a long history of C++ files that won't even get compiled.
So I would like to have
straight.el just download MELPA packages for things that are on MELPA and that I don't intend on modifying. But writing e.g.
(straight-use-package '(mozc :source (melpa gnu-elpa-mirror)) doesn't help;
straight.el still pulls the repo. Seeing the official docs' notes on backends, I'm guessing that getting packages from anywhere besides git is an unimplemented feature, but is this right?
As an additional, related goal, I'd like
straight.el to refrain from automatically downloading every single package on startup. For instance, I don't want
lsp-mode installed until and unless I open a file whose major mode is set up to use
lsp-mode. But I can't seem to find any info on this. Is there a way to configure packages without downloading them until there's demand?