File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -660,6 +660,17 @@ this is a command, not just a string."
660
660
(build (string-remove-prefix " :" (read-from-minibuffer " Select shadow-cljs build: " ))))
661
661
(format form build build)))
662
662
663
+ (defun cider-custom-cljs-repl-init-form ()
664
+ " Prompt for a form that would start a ClojureScript REPL.
665
+
666
+ The supplied string will be wrapped in a do form if needed."
667
+ (let ((form (read-from-minibuffer " Please, provide a form to start a ClojureScript REPL: " )))
668
+ ; ; TODO: We should probably make this more robust (e.g. by using a regexp or
669
+ ; ; parsing the form).
670
+ (if (string-prefix-p " (do" form)
671
+ form
672
+ (format " (do %s ) " form))))
673
+
663
674
(defconst cider-cljs-repl-types
664
675
'((" Rhino" " (cemerick.piggieback/cljs-repl (cljs.repl.rhino/repl-env))"
665
676
nil )
@@ -673,7 +684,8 @@ this is a command, not just a string."
673
684
cider-check-weasel-requirements)
674
685
(" Boot" " (do (require 'adzerk.boot-cljs-repl) (adzerk.boot-cljs-repl/start-repl))"
675
686
cider-check-boot-requirements)
676
- (" Shadow" cider-shadow-cljs-init-form cider-check-shadow-cljs-requirements))
687
+ (" Shadow" cider-shadow-cljs-init-form cider-check-shadow-cljs-requirements)
688
+ (" Custom" cider-custom-cljs-repl-init-form nil ))
677
689
" A list of supported ClojureScript REPLs.
678
690
679
691
For each one we have its name, the form we need to evaluate in a Clojure
You can’t perform that action at this time.
0 commit comments