-
-
Notifications
You must be signed in to change notification settings - Fork 649
Closed
Description
I would like to do this:
(cider-register-cljs-repl-type 'nbb-or-scittle-or-joyride "(+ 1 2 3)")
(defun mm/cider-connected-hook ()
(when (eq 'nbb-or-scittle-or-joyride 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)
(defun mm/cider-jack-in-nbb ()
(interactive)
(cider-jack-in-cljs
'(:jack-in-cmd
"nbb nrepl-server"
:cljs-repl-type
nbb-or-scittle-or-joyride)))
This almost works except that cider--check-cljs
ends up throwing because "require 'cljs.core" in sci based repls throws an error.
Here is a proposal:
(defun cider-verify-clojurescript-is-present ()
"Check whether ClojureScript is present."
(unless
(nrepl-dict-get (cider-sync-tooling-eval "cljs.core/inc") "value")
(user-error "ClojureScript is not available. See https://docs.cider.mx/cider/basics/clojurescript for details")))
checking cljs.core/inc should work everywhere. I already checked my nbb command and connecting to a shadow project repl.
Slack conversation:
https://clojurians.slack.com/archives/C029PTWD3HR/p1665687978090599
mk
Metadata
Metadata
Assignees
Labels
No labels