Wait, do you want to choose a alias with cider?

Wait, do you want to choose a alias with cider?

Another thing you may want/need is to use an alias when connecting cider. I know that cider can have that set up on your configuration. You can use .dir-locals.el to set up per project but I personally prefer to be able to choose when connecting.

(defun start-cider-repl-with-lein-profile ()
   (interactive)
   (letrec ((profile (read-string "Enter profile name: "))
          (lein-params (concat "with-profile +" profile " repl :headless :host localhost")))
     (message "lein-params set to: %s" lein-params)
     (set-variable 'cider-lein-parameters lein-params)
     (cider-jack-in '())))

 (defun start-cider-repl-with-cli-profile ()
   (interactive)
   (letrec ((profile (read-string "Enter profile name: "))
          (cli-params (concat "-A:" profile)))
     (message "cli-params set to: %s" cli-params)
     (set-variable 'cider-clojure-cli-aliases cli-params)
     (cider-jack-in '())))

/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: Wait, do you want to choose a alias with cider?