This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-22
Channels
- # babashka (36)
- # beginners (42)
- # calva (6)
- # chlorine-clover (25)
- # cider (31)
- # clara (5)
- # clj-kondo (55)
- # cljdoc (3)
- # cljs-dev (7)
- # cljsrn (3)
- # clojure (73)
- # clojure-brasil (6)
- # clojure-europe (8)
- # clojure-italy (2)
- # clojure-nl (3)
- # clojure-norway (1)
- # clojure-spec (3)
- # clojure-sweden (4)
- # clojure-switzerland (2)
- # clojure-uk (29)
- # clojurescript (93)
- # conjure (21)
- # data-science (14)
- # datomic (19)
- # emacs (4)
- # exercism (3)
- # figwheel-main (38)
- # fulcro (38)
- # graalvm (42)
- # graphql (5)
- # jackdaw (3)
- # jobs (1)
- # joker (2)
- # lambdaisland (1)
- # leiningen (31)
- # malli (8)
- # meander (5)
- # off-topic (27)
- # pathom (2)
- # pedestal (28)
- # re-frame (25)
- # reagent (2)
- # reitit (11)
- # releases (3)
- # remote-jobs (1)
- # rum (1)
- # shadow-cljs (63)
- # spacemacs (17)
- # sql (1)
Hey all! does anybody know if there's a variable / way to have cider in a cljc file only send to one side (ie. I want to evaluate a sexp in just CLJS, or in just CLJ)
i believe it should evaluate in the buffer that was most recently focused. so put point in the cljs repl, then back in the cljc ile and should be good
Interesting
The behavior I seem to have is it evaluating in both buffers
oh right. i think you can change the mode to clojurescript mode with m-x clojurescript-mode
and it shoudl behave as you want
Oh, that makes sense!
Thanks for the help
I'm having a helluva time getting cider working with shadow-cljs. I'm fairly certain its a cider/config issue and not a shadow-cljs issue.
The docs at https://docs.cider.mx/cider/cljs/shadow-cljs.html say "Provided you’ve configured your project correctly, you can simply use cider-jack-in-cljs
" ... yet I can't find a correct configuration.
Starting with a fresh shadow-cljs project, I can connect cider to the node-repl, and eval forms in the repl prompt. I can also use cider-eval-last-sexp
to eval forms, however cider-eval-buffer
doesn't seem to actually eval anything.
Make sure you have:
:nrepl {:middleware [cider-nrepl.plugin/middleware
refactor-nrepl.middleware/wrap-refactor]}
In your shadow-cljs.edn
I've run into issues in the past where it adds the deps, but doesn't actually load the middleware in shadow's nrepl. That may be fixed, this was as of a few months ago
(But worth trying just to see if that gets it going)
Ah, you're right - I am using deps.edn
here's a clever fix for that from lambda island: https://github.com/lambdaisland/chui/blob/master/.dir-locals.el#L8-L10
is it just an oversight that thats not added to the docs at https://docs.cider.mx/cider/cljs/shadow-cljs.html ?
I thought it was strange that it stated Provided you've configured your project correctly
but then never provided a configuration, just some commands on how to connect.
{:source-paths
["src/dev" "src/main" "src/test"]
:dependencies []
:nrepl {:middleware [cider-nrepl.plugin/middleware
refactor-nrepl.middleware/wrap-refactor]}
:builds {}}