Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature request: use-package integration #272
It would be neat if
(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
I was working on this and I struggling with unnamed hydras.
@jwiegley If so, how do you suggest to make
It's possible, with a major rewrite, to use no names at all, just unnamed lambdas. But I don't think it's the way to go, it would limit the transparency of what
@jwiegley, I don't see from your example where the new hydra will be bound. With no bindings, and no names, there's no way to call the generated commands. I think it's better to have names anyway. First reason, is that you can examine them with M-x. Here, I got completion for all heads in
Since I use
A second reason is that hydras can have dynamic properties settable by
Third reason, there's a way for a new hydra to inherit the heads of an existing one via the
I modified your example to this:
The return result is a keymap, which could be readily used by
I think the idea was to generate the hydra name from the package name. The example in the issue description would for example generate
I agree with keeping it simple and require a hydra name, at least for the first iteration, we always can add unnamed hydras later.
Thanks for your input!