From caa03b89c69d1f8479823d416c7a34aac0f8d61a Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Tue, 17 May 2022 21:17:07 +0200 Subject: [PATCH] Update docs --- README.md | 27 +++++++++++++++++++++++---- resources/public/nrepl.html | 2 +- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c2b2917..e6e1603 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,9 @@ babashka or Clojure JVM): @(promise) ;; wait until process is killed ``` -### REPL +### nREPL -To connect to a Scittle REPL from your editor, scittle provides an nREPL -implementation. To run the nREPL server you need to follow these steps: +To connect to a Scittle nREPL server from your editor, follow these steps: In babashka or Clojure JVM, use the [sci.nrepl](https://github.com/babashka/sci.nrepl) dependency and run: @@ -62,7 +61,27 @@ and start evaluating! See the `resources/public/nrepl.html` file for an example. When you run `bb dev` in this repository, and then open `http://localhost:1341/nrepl.html` you should -be able evaluate expressions in `resources/public/cljs/nrepl_playground.cljs`. +be able evaluate expressions in +`resources/public/cljs/nrepl_playground.cljs`. See a demo +[here](https://twitter.com/borkdude/status/1526285565343281159). + +### CIDER + +Currently when connecting from CIDER, you need to use this snippet: + +``` +(cider-register-cljs-repl-type 'sci-js "(+ 1 2 3)") + +(defun mm/cider-connected-hook () + (when (eq 'sci-js cider-cljs-repl-type) + (setq-local cider-show-error-buffer nil) + (cider-set-repl-type 'cljs))) + +(add-hook 'cider-connected-hook #'mm/cider-connected-hook) +``` + +Then choose `cider-connect-cljs`, select port `1339`, followed by the `sci-js` +REPL type. ## Tasks diff --git a/resources/public/nrepl.html b/resources/public/nrepl.html index b6fcb05..f7e903d 100644 --- a/resources/public/nrepl.html +++ b/resources/public/nrepl.html @@ -3,7 +3,7 @@ - +