Hi fellow Corgi users, How could I setup my config to have a shortcut that will run (clj-reload.core/reload) in the current namespace ?
Got it working, i added a (defun run-clj-reload ...) in my init (maybe not the best place) and added a signal and a key mapping. Easy ❤️
for stuff like this I tend to just stick in a register
we have an existing shortcut to run from a register
;; use with ,,<letter>, e.g. `,,g' runs (user/go)
(set-register ?g "#_clj (user/go)")the #_clj is a hint, if you have both a clj and a cljs repl in the project, then this tells corgi it should use the clj repl
I have these in my config
(set-register ?k "#_clj (do (require 'kaocha.repl) (kaocha.repl/run))")
(set-register ?K "#_clj (do (require 'kaocha.repl) (kaocha.repl/run-all))")
(set-register ?r "#_clj (do (require 'user :reload) (user/reset))")
(set-register ?g "#_clj (user/go)")
(set-register ?b "#_clj (user/browse)")
(set-register ?c "#_clj ((requiring-resolve 'nextjournal.clerk/serve!) {})")
(set-register ?, "#_clj (nextjournal.clerk/show! \"{{buffer-file-name}}\")")
(set-register ?p "#_clj (user/portal)")
(set-register ?P "#_cljs (user/portal)")