Here’s a little time saver for Emacs friends. src-dev/.dir-locals.el:
;; For Emacs users
;;
;; This just makes it so that jacking in with C-c M-j gives you a repl
;; right away rather than having to C-u C-c M-j and answer
;; "clojure-cli" followed by adding the :dev alias.
((clojurec-mode
(cider-preferred-build-tool . clojure-cli)
(cider-clojure-cli-aliases . ":dev")))Ok, your example is great, but it solves only a small part of the problem of working with cider. I would like to find step-by-step instructions for setting up emacs/electric
For me it works great. My only problem is that I don’t know how to evaluate cljs code from CIDER – for that, I just use the shadow-cljs dev server or hot reloading.
Feel free to ask if you have any other questions, I’ll try my best to answer :^)
I don’t know how to evaluate cljs code from CIDER> same:) I think this is a feature of cljc files
in other words, I don't understand how to evaluate code in reader-conditional statements. Is it possible? Hot reloading is great, but what if you need a little more?:)
I’ve no idea, please tell me if you find out
Make sure to check out the shadow-cljs dev server if you haven’t already, it’s a hidden gem imo 😄
@bozhidar dumb question: can we evaluate cljs expression in cljc file? If yes then how?
Yeah, you can. You just have to have a ClojureScript connection active for this to work.
See https://docs.cider.mx/cider/cljs/up_and_running.html#working-with-cljc-files for more info.
thanks)
Sorry, I don’t quite understand what you’re asking 😅
Thanks!:) Will there be anything special for cider in deps.edn?
If you use CIDER jack-in CIDER automatically adds the :cider/nrepl alias so nothing more is needed.
But how about this? https://clojurians.slack.com/archives/C0617A8PQ/p1690813317637669?thread_ts=1690771533.022539&cid=C0617A8PQ