This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-09
Channels
- # announcements (1)
- # atlanta-clojurians (1)
- # beginners (198)
- # calva (4)
- # cider (16)
- # clara (8)
- # cljs-dev (14)
- # cljsrn (4)
- # clojure (204)
- # clojure-europe (3)
- # clojure-gamedev (2)
- # clojure-italy (8)
- # clojure-nl (17)
- # clojure-poland (3)
- # clojure-russia (20)
- # clojure-spec (32)
- # clojure-uk (45)
- # clojurescript (59)
- # community-development (1)
- # core-async (25)
- # cursive (20)
- # datomic (47)
- # emacs (7)
- # fulcro (8)
- # iot (1)
- # iotivity (2)
- # jobs (1)
- # jobs-discuss (8)
- # juxt (11)
- # luminus (5)
- # nrepl (4)
- # off-topic (136)
- # onyx (24)
- # other-lisps (1)
- # parinfer (74)
- # pedestal (1)
- # planck (3)
- # portkey (67)
- # random (1)
- # re-frame (28)
- # reagent (11)
- # reitit (9)
- # remote-jobs (3)
- # ring-swagger (2)
- # rum (3)
- # shadow-cljs (96)
- # slack-help (3)
- # spacemacs (6)
- # tools-deps (3)
- # unrepl (1)
- # vim (4)
Does anyone know how to connect vim-fireplace to a shadow-cljs repl? I created a shadow-cljs.edn file with the following config, first without dependencies and added them without any success:
{:source-paths ["src"]
:dependencies [[cider/cider-nrepl "0.18.0"]
[figwheel "0.5.15"]
[com.cemerick/piggieback "0.2.2"]
[org.clojure/tools.nrepl "0.2.13"]]
:nrepl {:port 3333}
:builds {:app {:target :browser
:output-dir "public/js"
:modules {:main {:entries [hello-shadow-cljs.core]}}}}}
Then I run shadow-cljs watch app
with the following output:
shadow-cljs - config: ~/hello-shadow-cljs/shadow-cljs.edn cli version: 2.7.13 node: v8.10.0
shadow-cljs - starting ...
Jan 09, 2019 10:18:47 PM org.xnio.Xnio <clinit>
INFO: XNIO version 3.3.8.Final
Jan 09, 2019 10:18:47 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.3.8.Final
[2019-01-09 22:18:50.370 - INFO] Using tools.nrepl 0.2.* server!
shadow-cljs - server version: 2.7.13
shadow-cljs - server running at
shadow-cljs - socket REPL running on port 52619
shadow-cljs - nREPL server started on port 3333
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (134 files, 1 compiled, 0 warnings, 2.02s)
When I fire a fireplace command I get the following error:
Error detected while processing function <SNR>166_printop[1]..<SNR>166_opfunc[35]..fireplace#client:
line 10:
E605: Exception not caught: Fireplace: class java.lang.AssertionError
Press ENTER or type command to continue
With leiningen everything works fineI got it working with the following configuration in shadow-cljs.edn:
{:source-paths ["src"]
:dependencies [[cider/cider-nrepl "0.16.0-SNAPSHOT"]]
:nrepl {:port 3333}
:builds {:app {:target :browser
:output-dir "public/js"
:assets "/assets"
:modules {:main {:entries [hello.core]}}
:devtools {:http-root "public"
:http-port 8080}}}}
The next step is to create an index.html file that loads the compiled main.js
file under public/js/main.js
Once main,js is loaded in a browser you can connect with piggieback using the following vim command:
:Piggieback :app
So what I was missing was that the cljs repl was not started yet, for this main.js had to be loaded which activates the repl.