Easily create repo-specific menus for Emacs. There is also a transient based version of this library repo-transient.el
This library was inspired by an amazingly instructive interview by Juan Monetta (@jpmonettas), he also wrote the main macro which I only slightly changed and turned into a library.
This is an example repo-hydra for this repository. Note, that the first argument to repo-hydra-define
has to exactly match the root directory name of the git repo (case sensitive).
(repo-hydra-define
"repo-hydra.el"
("i" text-scale-increase "In")
("o" text-scale-decrease "Out"))
If repo-hydra-show
is called from within the repo-hydra.el
repository, the hydra will show:
I have kept the original logic of the Clojure macro in repo-hydra-define-clj
, it automatically evaluates the clojure code in strings with the current CIDER REPL:
(repo-hydra-define-clj
"sanskrit"
("c" sanskrit-cider-connect "Connect REPL" (cider-connect-clj '(:host "localhost" :port 33000)))
("p" sanskrit-portal "Portal" "(user/portal)")
("P" sanskrit-clear-portal "Clear Portal" "(user/clear-portal)")
("S" sanskrit-require-snitch "Require snitch" "(require '[snitch.core :refer [defn* defmethod* *fn *let]])"))
(use-package repo-hydra
:straight (:type git :host github :repo "licht1stein/repo-hydra.el")
:bind ("<f6>" . repo-hydra-show))
This library uses break versioning, this means that upgrading from 1.0.x to 1.0.whatever is always non-breaking, upgrading to 1.1.x might break something small, and upgrading to 2.x.x will break something big.