Created
July 10, 2022 09:39
-
-
Save codeasone/6b2edf963915621ee66f938364875cd6 to your computer and use it in GitHub Desktop.
Some more shadow-cljs REPL guidance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((nil . ((clojure-directory-prefixes . ("\\`clj[scx]?\\." | |
"\\`bb\\.")) | |
(cider-preferred-build-tool . clojure-cli) | |
(cider-clojure-cli-global-options . "-A:dev:test:backend:frontend") | |
(cider-default-cljs-repl . custom) | |
(cider-custom-cljs-repl-init-form . "(do (user/cljs-repl))") | |
(eval . (progn | |
(make-variable-buffer-local 'cider-jack-in-nrepl-middlewares) | |
(add-to-list 'cider-jack-in-nrepl-middlewares "shadow.cljs.devtools.server.nrepl/middleware")))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns user | |
(:require [shadow.cljs.devtools.api :as shadow] | |
[shadow.cljs.devtools.server :as server])) | |
(defn cljs-repl | |
([] | |
(cljs-repl :app)) | |
([build-id] | |
(server/start!) | |
(shadow/watch build-id) | |
(shadow/nrepl-select build-id))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using this approach with
cider-jack-in-clj&cljs
to establish sanecider
REPL sessions for some projects and it seems to work well, with sesman reporting[*cider-repl %s(cljs:custom)*, *cider-repl %s(clj)*]
upon jack-in.