Hi guys, I am using emacs with .dir-locals.el, when cider-jack-in I noticed that it automatically appends cider/nrepl to the alias list and overrides :main-opts defined in other aliases. Is there a configuration to prevent cider-jack-in from adding the alias or override main-opts ? I am aware that I can use C-u cider-jack-in trick, but just want to be lazy and don't have to type C-u each time π
At this point itβs usually better to just start the process and an nrepl server in a terminal and connect to it. Theres no real benefit to starting the process in eMacs.
Another trick: C-h v and start typing to guess the name of the config variable.. yep it's cider-inject-dependencies-at-jack-in
thanks! Looks like if I set (cider-inject-dependencies-at-jack-in . nil), there will be no clojure args provided at all, cider-jacke-in will invoke the command like [nREPL] Starting server via /usr/bin/clojure nil, ie, all aliases are ignored
That sounds like a bug π€
If the main-opts in the cider isn't called then the nrepl middleware isn't activated, so evaluation will be broken. So when using jack-in Cider should he the only alias to run main opts (there can only be one, the last in the list) Aliases can be added using a .dir-locals.el file containing this
((clojure-mode . ((cider-preferred-build-tool . clojure-cli) (cider-clojure-cli-aliases . ":dev/env:env/test"))))
Setting tue build tool is optional.
More examples at https://practical.li/spacemacs/clojure-development/project-configuration/