This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-04
Channels
- # atom-editor (2)
- # babashka (39)
- # beginners (123)
- # calva (90)
- # cider (57)
- # clojure (103)
- # clojure-australia (13)
- # clojure-europe (38)
- # clojure-france (3)
- # clojure-italy (13)
- # clojure-nl (7)
- # clojure-norway (2)
- # clojure-seattle (1)
- # clojure-uk (22)
- # clojurescript (28)
- # conjure (20)
- # cursive (2)
- # datascript (1)
- # datomic (20)
- # depstar (23)
- # emacs (1)
- # events (2)
- # graphql (12)
- # honeysql (4)
- # jobs (2)
- # kaocha (2)
- # malli (14)
- # music (2)
- # off-topic (103)
- # pathom (8)
- # polylith (7)
- # quil (3)
- # reagent (7)
- # reitit (2)
- # remote-jobs (1)
- # shadow-cljs (55)
- # slack-help (4)
- # spacemacs (29)
- # xtdb (16)
Every time I paste something in, my entire file is auto-indented. Does anyone know how to turn that off? I have aggressive-indent-mode
turned off.
yeah I just added it to a hydra under ? and labelled it "Show src" else i will be back asking again in a few months 🙂
Hello. I’m facing a problem similar to the one in this ticket: https://github.com/clojure-emacs/cider/issues/2237
However, I’m on
;; CIDER 0.25.0snapshot (package: 20200602.710), nREPL 0.7.0
;; Clojure 1.10.1, Java 14.0.2
I’m using Spacemacs
I evaluate anything that throws an exception and the dialog shows up 1 second later, maybe more
I’ve accidentally ended up exiting emacs a few times as a consequence 🙂
Does anybody have a suggestion other than upgrading packages? That is a last resort…
Ah, alright, Ignore, I gave up and upgraded, the Cider version certainly seemed old. Seems to have fixed it
Hello, I use emacs/cider and have a clojurescript project build with shadow cljs. I connected to the nrepl server, but I'm not able to send s-expressions to
the repl with C-c C-e
like I normally do. Can anybody help me with this?
is this a webapp? If so, evaluate (js/alert "HI")
to prove you're actually in a cljs repl
i also get some errors on shadow start
[:failed-to-compare "^17.0.1" "17.0.1" #error {
:cause "Cannot invoke \"Object.getClass()\" because \"target\" is null"
:via
[{:type java.lang.NullPointerException
:message "Cannot invoke \"Object.getClass()\" because \"target\" is null"
:at [clojure.lang.Reflector invokeInstanceMethod "Reflector.java" 97]}]
:trace
[[clojure.lang.Reflector invokeInstanceMethod "Reflector.java" 97]
[shadow.cljs.devtools.server.npm_deps$make_engine invokeStatic "npm_deps.clj" 39]
[shadow.cljs.devtools.server.npm_deps$make_engine invoke "npm_deps.clj" 32]
[shadow.cljs.devtools.server.npm_deps$fn__15774$fn__15775 invoke "npm_deps.clj" 46]
[clojure.lang.Delay deref "Delay.java" 42]
[clojure.core$deref invokeStatic "core.clj" 2320]
[clojure.core$deref invoke "core.clj" 2306]
[shadow.cljs.devtools.server.npm_deps$fn__15774$fn__15777 invoke "npm_deps.clj" 52]
[shadow.cljs.devtools.server.npm_deps$is_installed_QMARK_ invokeStatic "npm_deps.clj" 219]
[shadow.cljs.devtools.server.npm_deps$is_installed_QMARK_ invoke "npm_deps.clj" 213]
[shadow.cljs.devtools.server.npm_deps$main$fn__15867 invoke "npm_deps.clj" 239]
[clojure.core$complement$fn__5669 invoke "core.clj" 1441]
[clojure.core$filter$fn__5893 invoke "core.clj" 2821]
[clojure.lang.LazySeq sval "LazySeq.java" 42]
[clojure.lang.LazySeq seq "LazySeq.java" 51]
[clojure.lang.RT seq "RT.java" 535]
[clojure.core$seq__5402 invokeStatic "core.clj" 137]
[clojure.core$seq__5402 invoke "core.clj" 137]
[shadow.cljs.devtools.server.npm_deps$main invokeStatic "npm_deps.clj" 241]
[shadow.cljs.devtools.server.npm_deps$main invoke "npm_deps.clj" 228]
[shadow.cljs.devtools.cli_actual$main invokeStatic "cli_actual.clj" 141]
[shadow.cljs.devtools.cli_actual$main doInvoke "cli_actual.clj" 132]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.core$apply invokeStatic "core.clj" 669]
[clojure.core$apply invoke "core.clj" 660]
[shadow.cljs.devtools.cli_actual$_main invokeStatic "cli_actual.clj" 219]
[shadow.cljs.devtools.cli_actual$_main doInvoke "cli_actual.clj" 217]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 665]
[clojure.core$apply invoke "core.clj" 660]
[shadow.cljs.devtools.cli$_main invokeStatic "cli.clj" 75]
[shadow.cljs.devtools.cli$_main doInvoke "cli.clj" 67]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 665]
[clojure.main$main_opt invokeStatic "main.clj" 514]
[clojure.main$main_opt invoke "main.clj" 510]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]]}]
shadow-cljs - HTTP server available at
shadow-cljs - server version: 2.9.10 running at
shadow-cljs - nREPL server started on port 42499
shadow-cljs - watching build :app
my shadow-cljs.edn
;; shadow-cljs configuration
{:source-paths
["src"]
:dependencies
[[reagent "1.0.0"]
[cljs-ajax "0.8.1"]
[re-frame "1.1.2"]]
:builds
{:app
{:target :browser
:output-dir "public/js"
:asset-path "/js"
:modules
{:main
{:init-fn
:entries []}}
:devtools
{:http-root "public"
:http-port 8000}
:nrepl {:port 9000}}}}
;; shadow-cljs configuration
{:source-paths
["src"]
:dependencies
[[reagent "1.0.0"]
[cljs-ajax "0.8.1"]
[re-frame "1.1.2"]]
:builds
{:app
{:target :browser
:output-dir "public/js"
:asset-path "/js"
:modules
{:main
{:init-fn
:entries []}}
:devtools
{:http-root "public"
:http-port 8000}}}
:nrepl {:port 9000}}
so cider will start shadow up like this:
npx shadow-cljs -d nrepl/nrepl:0.8.3 -d cider/cider-nrepl:0.25.8 server
and then in the repl after connecting:
shadow.user> (require '[shadow.cljs.devtools.api :as shadow])
nil
shadow.user> (shadow/watch :app)
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (174 files, 0 compiled, 0 warnings, 3.87s)
:watching
shadow.user> (js/alert "hi")
Syntax error compiling at (*cider-repl clojure/asg-ignite-app:localhost:58111(clj)*:17:14).
No such namespace: js
shadow.user> (shadow/nrepl-select :app)
To quit, type: :cljs/quit
[:selected :app]
cljs.user> (js/alert "hi")
nil
cljs.user>
i did cider-connect
(not the cljs one). but try shadow-select and then choose your build
You can mute this warning by changing cljr-suppress-middleware-warnings.shadow.user>
shadow.user> (require '[shadow.cljs.devtools.api :as shadow])
;; => nil
shadow.user> (shadow/watch :app)
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (216 files, 215 compiled, 0 warnings, 38.84s)
;; => :watching
shadow.user> (js/alert "hi")
Syntax error compiling at (*cider-repl workspace/listshare:localhost:9000(clj)*:26:14).
No such namespace: js
shadow.user> (shadow/nrepl-select :app)
To quit, type: :cljs/quit
[:selected :app]
cljs.user> (js/alert "hi")
nil
so you're telling shadow to watch :app (compile the cljs files and recompile if they change) and then select that repl (nrepl-select :app)
Awesome. Took me a lot of time to finally come here and ask. You are a great person just helping randoms on the internet 🙏