Fork me on GitHub
Andreas Liljeqvist13:09:50

How can I use a specific alias when using jack-in with deps.edn?


@andreas862 set cider-clojure-cli-global-options


(setq cider-clojure-cli-global-options "-A:test")

Andreas Liljeqvist13:09:49

Thanks - Tried it, but unsure if has taken any effect

Andreas Liljeqvist13:09:45

Starting nREPL-server via doesn't contain the option, but it ends with ... so could contain more

Andreas Liljeqvist13:09:49

The variable is set at least


(defcustom cider-clojure-cli-global-options
  "Command line options used to execute clojure with tools.deps."
  :type 'string
  :group 'cider
  :safe #'stringp
  :package-version '(cider . "0.17.0"))


I tend to set it in a .dir-locals.el in the project root


((nil . ((cider-clojure-cli-global-options . "-A:dev"))))


your cider is fairly recent?


you can try M-x customize-variable

Andreas Liljeqvist13:09:59

Seems like my cider was too old, thanks for your help


on the same vein when I jack in using deps.edn is there a good way to default to figwheel.main?

Andreas Liljeqvist15:09:09

@jduhamel I suppose you could set "-m figwheel.main"


could do. Currently I just wait for the pop up and select figwheel-main when doing a clojurescript jack-in.

Andreas Liljeqvist15:09:20

I would think that there are ways to set up variables per project in Emacs


I cna do it in .dirs-local.el if needed.


@richiardiandrea Following the just led to more confusion. Based on the docs I should have the line ’(setq cider-default-cljs-repl ’figwheel-main)` in my .emacs when I do that I get an error saying ‘Figwheel-main is not available’ but if I don’t have that line in it prompts me for the type of repl I want and figwheel-main is included in that list.


@richiardiandrea Actually there seems to be a regression elsewhere. I unset all my new variables and still had an issue on stuff that was working yesterday.


uhm, I currently doing (cider-default-cljs-repl . shadow) in a .dir-locals.el file and it works so I don't know what could've broken


that list is static so it will offer that choice regardless if its a figwheel project. I suspect you need an -A:fig in your invocation. Most probably this is starting up without figwheel main which explains the error you are seeing