Fork me on GitHub
#cider
<
2018-09-18
>
Andreas Liljeqvist13:09:50

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

plexus13:09:06

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

plexus13:09:18

(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

plexus13:09:12

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

plexus13:09:23

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

plexus13:09:30

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

plexus13:09:42

your cider is fairly recent?

plexus13:09:10

you can try M-x customize-variable

Andreas Liljeqvist13:09:59

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

jduhamel14:09:11

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"

jduhamel15:09:01

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

jduhamel15:09:37

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

jduhamel17:09:57

@richiardiandrea Following the https://cider.readthedocs.io/en/latest/clojurescript 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.

jduhamel17:09:24

@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.

richiardiandrea17:09:02

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

dpsutton18:09:01

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