It would be neat if hydra provided a :hydra keyword to use-package (by extending use-package-keywords), that would gensym the hydra name and allow the bindings to be declared as part of the use-package declaration, with autoloads generated for all the referenced function names as they are now for :bind. Example:
(use-package yasnippet
:load-path "site-lisp/yasnippet"
:after hydra
:demand t
:diminish yas-minor-mode
:commands (yas-expand yas-minor-mode)
:functions (yas--guess-snippet-directories yas--table-name)
:defines (yas--guessed-modes)
:mode ("/\\.emacs\\.d/snippets/" . snippet-mode)
:hydra ((:color blue :hint nil)
"
^YASnippets^
--------------------------------------------
Modes: Load/Visit: Actions:
_g_lobal _d_irectory _i_nsert
_m_inor _f_ile _t_ryout
_e_xtra _l_ist _n_ew
_a_ll
"
("d" yas-load-directory)
("e" yas-activate-extra-mode)
("i" yas-insert-snippet)
("f" yas-visit-snippet-file :color blue)
("n" yas-new-snippet)
("t" yas-tryout-snippet)
("l" yas-describe-tables)
("g" yas/global-mode)
("m" yas/minor-mode)
("a" yas-reload-all)))
As a bonus, also accepting ("d" . yas-load-directory) would make it appear more consistent with :bind.
It would be neat if
hydraprovided a:hydrakeyword touse-package(by extendinguse-package-keywords), that would gensym the hydra name and allow the bindings to be declared as part of the use-package declaration, with autoloads generated for all the referenced function names as they are now for:bind. Example:As a bonus, also accepting
("d" . yas-load-directory)would make it appear more consistent with:bind.