Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the Krell REPL support #2861

Merged
merged 1 commit into from
Aug 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions cider.el
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,12 @@ Generally you should not disable this unless you run into some faulty check."
(unless (cider-library-present-p "adzerk.boot-cljs-repl")
(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")))

(defun cider-check-krell-requirements ()
"Check whether we can start a Krell ClojureScript REPL."
(cider-verify-piggieback-is-present)
(unless (cider-library-present-p "krell.repl")
(user-error "The Krell ClojureScript REPL is not available. Please check https://github.com/vouch-opensource/krell for details")))

(defun cider-check-shadow-cljs-requirements ()
"Check whether we can start a shadow-cljs REPL."
(unless (cider-library-present-p "shadow.cljs.devtools.api")
Expand Down Expand Up @@ -825,6 +831,15 @@ The supplied string will be wrapped in a do form if needed."
cider-check-boot-requirements)
(shadow cider-shadow-cljs-init-form cider-check-shadow-cljs-requirements)
(shadow-select cider-shadow-select-cljs-init-form cider-check-shadow-cljs-requirements)
(krell "(require '[clojure.edn :as edn]
'[clojure.java.io :as io]
'[cider.piggieback]
'[krell.api :as krell]
'[krell.repl])
(def config (edn/read-string (slurp (io/file \"build.edn\"))))
(krell/build config)
(apply cider.piggieback/cljs-repl (krell.repl/repl-env) (mapcat identity config))"
cider-check-krell-requirements)
(custom cider-custom-cljs-repl-init-form nil))
"A list of supported ClojureScript REPLs.

Expand Down Expand Up @@ -867,6 +882,7 @@ you're working on."
(const :tag "Boot" boot)
(const :tag "Shadow" shadow)
(const :tag "Shadow w/o Server" shadow-select)
(const :tag "Krell" krell)
(const :tag "Custom" custom))
:group 'cider
:safe #'symbolp
Expand Down