I've been updating all my use-package calls now that :idle
is no longer a decent way to defer stuff. At the moment one of the biggest hits on my load time is elpy
which loads a whole bunch of additional modules. At the moment my invocation is rather basic:
(use-package elpy
:commands elpy-enable
:init (elpy-enable)
:config
(progn
(setq elpy-rpc-backend "jedi"
elpy-rpc-project-specific 't)
(when (fboundp 'flycheck-mode)
(setq elpy-modules (delete 'elpy-module-flymake elpy-modules)))))
However this is rather wasteful if I'm never editing any python modules. The trouble is elpy is a collection of modes so I can't just use the mode binding form as elpy-enable
needs to get called. So what approach should I use. Is it just a case of triggering on the python-mode hook?