Skip to content

Commit f436760

Browse files
authored
Add ClojureCLR support (#203)
1 parent 151b20b commit f436760

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
## master (unreleased)
4+
* [#202](https://github.com/clojure-emacs/inf-clojure/issues/202): Add ClojureCLR support.
45

56
## 3.2.1 (2022-07-22)
67

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ It supports the following REPLs:
3131

3232
- Clojure
3333
- ClojureScript
34+
- ClojureCLR (via [lein-clr](https://github.com/kumarshantanu/lein-clr))
3435
- [Planck](http://planck-repl.org/)
3536
- [Lumo](https://github.com/anmonteiro/lumo)
3637
- [Joker](https://joker-lang.org/)
3738
- [babashka](https://github.com/borkdude/babashka)
3839

3940
`inf-clojure` provides a set of essential features for interactive
40-
Clojure(Script) development:
41+
Clojure/ClojureScript/ClojureCLR development:
4142

4243
* Enhanced REPL
4344
* Interactive code evaluation

inf-clojure.el

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
;; REPL.
3737
;;
3838
;; `inf-clojure` provides a set of essential features for interactive
39-
;; Clojure(Script) development:
39+
;; Clojure/ClojureScript/ClojureCLR development:
4040
;;
4141
;; * REPL
4242
;; * Interactive code evaluation
@@ -75,6 +75,7 @@
7575
(boot . "boot repl")
7676
(clojure . "clojure")
7777
(cljs . "clojure -m cljs.main -r")
78+
(lein-clr . "lein clr repl")
7879
(planck . "planck -d")
7980
(babashka . "bb")
8081
(lumo . "lumo -d")
@@ -153,7 +154,22 @@
153154
(ns-vars . "(clojure.repl/dir %s)")
154155
(set-ns . "(clojure.core/in-ns '%s)")
155156
(macroexpand . "(clojure.core/macroexpand '%s)")
156-
(macroexpand-1 . "(clojure.core/macroexpand-1 '%s)")))))
157+
(macroexpand-1 . "(clojure.core/macroexpand-1 '%s)")))
158+
(lein-clr . ((load . "(clojure.core/load-file \"%s\")")
159+
(doc . "(clojure.repl/doc %s)")
160+
(source . "(clojure.repl/source %s)")
161+
(arglists .
162+
"(try
163+
(:arglists
164+
(clojure.core/meta
165+
(clojure.core/resolve
166+
(clojure.core/read-string \"%s\"))))
167+
(catch Exception e nil))")
168+
(apropos . "(doseq [var (sort (clojure.repl/apropos \"%s\"))] (println (str var)))")
169+
(ns-vars . "(clojure.repl/dir %s)")
170+
(set-ns . "(clojure.core/in-ns '%s)")
171+
(macroexpand . "(clojure.core/macroexpand '%s)")
172+
(macroexpand-1 . "(clojure.core/macroexpand-1 '%s)")))))
157173

158174
(defvar-local inf-clojure-repl-type nil
159175
"Symbol to define your REPL type.

0 commit comments

Comments
 (0)