Skip to content

Commit 8146bb5

Browse files
committed
[Docs] Improve the docs about self-hosted ClojureScript REPLs
1 parent 3c73886 commit 8146bb5

File tree

5 files changed

+46
-11
lines changed

5 files changed

+46
-11
lines changed

doc/modules/ROOT/nav.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
** xref:platforms/overview.adoc[Overview]
1515
** xref:platforms/babashka.adoc[Babashka]
1616
** xref:platforms/nbb.adoc[Nbb]
17-
** xref:platforms/scittle_and_friends.adoc[Scittle and Friends]
17+
** xref:platforms/other_platforms.adoc[Other Platforms]
1818
* Using CIDER
1919
** xref:usage/interactive_programming.adoc[Interactive Programming]
2020
** xref:usage/cider_mode.adoc[Using cider-mode]

doc/modules/ROOT/pages/cljs/other_repls.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,23 @@ and insert `dev`.
8686
. Connect to the running server with your browser. The address is printed on the terminal, but it's probably `+http://localhost:3000+`.
8787

8888
For more information visit https://github.com/adzerk-oss/boot-cljs-repl[boot-cljs-repl].
89+
90+
== nbb (node.js babashka)
91+
92+
CIDER has built-in support for `nbb`. You can either jack in to an nbb project with `M-x clojure-jack-in-cljs`.
93+
94+
or start its bundled nREPL server:
95+
96+
$ nbb nrepl-server
97+
98+
and connect to it afterwards using `M-x cider-connect-cljs`.
99+
100+
See the xref:platforms/nbb.adoc[dedicated page] for more details.
101+
102+
== Other Self-hosted REPLs
103+
104+
For all other self-hosted REPLs you can follow the instructions xref:platforms/other_platforms.adoc[here]. This will work fine with any well-behaved nREPL implementation, like those of:
105+
106+
* https://github.com/babashka/nbb[nbb]
107+
* https://github.com/babashka/scittle[scittle]
108+
* https://github.com/BetterThanTomorrow/joyride[joyride]

doc/modules/ROOT/pages/platforms/babashka.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
= Babashka
22

3-
Babashka is highly compatible with Clojure, so it works with CIDER out of the box. All you need to do
3+
== Overview
4+
5+
Babashka is highly compatible with Clojure, so it works with CIDER out of the box.
6+
7+
== Usage
8+
9+
All you need to do
410
is start its bundled nREPL server:
511

612
$ bb --nrepl-server
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
= https://github.com/babashka/nbb[nbb]
22

3-
Nbb's main goal is to make it easy to get started with ad hoc CLJS scripting on Node.js.
3+
== Overview
4+
5+
Nbb's main goal is to make it easy to get started with ad hoc ClojureScript scripting on Node.js.
46

57
It is highly compatible with ClojureScript, so it works with CIDER out of the box.
68

9+
== Usage
10+
711
You can either jack in to an nbb project with `M-x clojure-jack-in-cljs`.
812

913
or start its bundled nREPL server:
1014

1115
$ nbb nrepl-server
1216

1317
and connect to it afterwards using `M-x cider-connect-cljs`.
18+
19+
NOTE: `cider-jack-in-cljs` works with nbb projects that are using `nbb.edn`.

doc/modules/ROOT/pages/platforms/scittle_and_friends.adoc renamed to doc/modules/ROOT/pages/platforms/other_platforms.adoc

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= Scittle, Nbb, Joyride, and future (n)REPLs
1+
= Other Platforms
22

33
== The Problem
44

@@ -18,12 +18,14 @@ make CIDER more runtime-agnostic.
1818
== The Solution
1919

2020
As of CIDER 1.6, the default CIDER connection command `cider-connect-clj` is
21-
capable of connecting to any nREPL server that provides minimal required
22-
functionality.
21+
capable of connecting to any nREPL server that implements the core nREPL
22+
protocol interface.
2323

2424
As such, all of these work:
25-
https://github.com/babashka/nbb[nbb],
26-
https://github.com/babashka/scittle[scittle], https://github.com/BetterThanTomorrow/joyride[joyride]
25+
26+
* https://github.com/babashka/nbb[nbb]
27+
* https://github.com/babashka/scittle[scittle]
28+
* https://github.com/BetterThanTomorrow/joyride[joyride]
2729

2830
First start an nREPL server (the project's Readme usually has a section
2931
on starting a nREPL server).
@@ -37,9 +39,10 @@ to connect to any Clojure(Script) nREPL server.
3739
Features:
3840

3941
* Eval, load file etc.
40-
* Errors as overlays. (The default cider error buffer is not implemented currently).
42+
* Code completion.
43+
* Errors as overlays. (The default CIDER error buffer is not implemented currently).
4144
* Other nREPL features the server provides; This might be rather minimal.
4245

43-
Nbb, Scittle and Joyride all have quite cool completions already.
46+
Basically you'll get every feature that's implemented by the nREPL server you're using.
4447

45-
NOTE: For nbb you can alternatively connect via cljs, see xref:platform/nbb.adoc[Nbb]
48+
NOTE: For nbb you can alternatively connect via `cider-connect-cljs`, see xref:platform/nbb.adoc[nbb].

0 commit comments

Comments
 (0)