@@ -330,6 +330,7 @@ Sub-match 1 must be the project path.")
330
330
('clojure-cli cider-clojure-cli-command)
331
331
('shadow-cljs cider-shadow-cljs-command)
332
332
('gradle cider-gradle-command)
333
+ ('krell cider-clojure-cli-command)
333
334
(_ (user-error " Unsupported project type `%S' " project-type))))
334
335
335
336
(defun cider-jack-in-resolve-command (project-type )
@@ -345,6 +346,7 @@ Throws an error if PROJECT-TYPE is unknown."
345
346
(when-let* ((command (cider--resolve-command (car parts))))
346
347
(mapconcat #'identity (cons command (cdr parts)) " " ))))
347
348
('gradle (cider--resolve-command cider-gradle-command))
349
+ ('krell (cider--resolve-command cider-clojure-cli-command))
348
350
(_ (user-error " Unsupported project type `%S' " project-type))))
349
351
350
352
(defun cider-jack-in-global-options (project-type )
@@ -355,23 +357,28 @@ Throws an error if PROJECT-TYPE is unknown."
355
357
('clojure-cli cider-clojure-cli-global-options)
356
358
('shadow-cljs cider-shadow-cljs-global-options)
357
359
('gradle cider-gradle-global-options)
360
+ ('krell cider-clojure-cli-global-options)
358
361
(_ (user-error " Unsupported project type `%S' " project-type))))
359
362
363
+ (defun cider--clojure-cli-parameters ()
364
+ (format cider-clojure-cli-parameters
365
+ (concat
366
+ " ["
367
+ (mapconcat
368
+ (apply-partially #'format " \" %s\" " )
369
+ (cider-jack-in-normalized-nrepl-middlewares)
370
+ " , " )
371
+ " ]" )))
372
+
360
373
(defun cider-jack-in-params (project-type )
361
374
" Determine the commands params for `cider-jack-in' for the PROJECT-TYPE."
362
375
(pcase project-type
363
376
('lein cider-lein-parameters)
364
377
('boot cider-boot-parameters)
365
- ('clojure-cli (format cider-clojure-cli-parameters
366
- (concat
367
- " ["
368
- (mapconcat
369
- (apply-partially #'format " \" %s\" " )
370
- (cider-jack-in-normalized-nrepl-middlewares)
371
- " , " )
372
- " ]" )))
378
+ ('clojure-cli (cider--clojure-cli-parameters))
373
379
('shadow-cljs cider-shadow-cljs-parameters)
374
380
('gradle cider-gradle-parameters)
381
+ ('krell (cider--clojure-cli-parameters))
375
382
(_ (user-error " Unsupported project type `%S' " project-type))))
376
383
377
384
@@ -689,6 +696,12 @@ Generally you should not disable this unless you run into some faulty check."
689
696
(unless (cider-library-present-p " adzerk.boot-cljs-repl" )
690
697
(user-error " The Boot ClojureScript REPL is not available. Please check https://github.com/adzerk-oss/boot-cljs-repl/blob/master/README.md for details" )))
691
698
699
+ (defun cider-check-krell-requirements ()
700
+ " Check whether we can start a Krell ClojureScript REPL."
701
+ (cider-verify-piggieback-is-present)
702
+ (unless (cider-library-present-p " krell.repl" )
703
+ (user-error " The Krell ClojureScript REPL is not available. Please check https://github.com/vouch-opensource/krell for details" )))
704
+
692
705
(defun cider-check-shadow-cljs-requirements ()
693
706
" Check whether we can start a shadow-cljs REPL."
694
707
(unless (cider-library-present-p " shadow.cljs.devtools.api" )
@@ -825,6 +838,15 @@ The supplied string will be wrapped in a do form if needed."
825
838
cider-check-boot-requirements)
826
839
(shadow cider-shadow-cljs-init-form cider-check-shadow-cljs-requirements)
827
840
(shadow-select cider-shadow-select-cljs-init-form cider-check-shadow-cljs-requirements)
841
+ (krell " (require '[clojure.edn :as edn]
842
+ '[clojure.java.io :as io]
843
+ '[cider.piggieback]
844
+ '[krell.api :as krell]
845
+ '[krell.repl])
846
+ (def config (edn/read-string (slurp (io/file \" build.edn\" ))))
847
+ (krell/build config)
848
+ (apply cider.piggieback/cljs-repl (krell.repl/repl-env) (mapcat identity config))"
849
+ cider-check-krell-requirements)
828
850
(custom cider-custom-cljs-repl-init-form nil ))
829
851
" A list of supported ClojureScript REPLs.
830
852
@@ -867,6 +889,7 @@ you're working on."
867
889
(const :tag " Boot" boot)
868
890
(const :tag " Shadow" shadow )
869
891
(const :tag " Shadow w/o Server" shadow-select)
892
+ (const :tag " Krell" krell)
870
893
(const :tag " Custom" custom))
871
894
:group 'cider
872
895
:safe #'symbolp
0 commit comments