@@ -243,22 +243,46 @@ configurable.
243
243
You can see all the configuration options available using the command
244
244
` M-x customize-group RET inf-clojure ` .
245
245
246
+ The supported repl-features are in an alist called
247
+ ` inc-clojure-repl-features ` and it has the following shape:
248
+
249
+ ``` emacs-lisp
250
+ '((cljs . ((doc . "(cljs.repl/doc %s)")
251
+ (source . "(cljs.repl/source %s)")
252
+ (arglists . "(try (->> '%s cljs.core/resolve cljs.core/meta :arglists) (catch :default _ nil))")
253
+ (apropos . "(cljs.repl/apropos \"%s\")")
254
+ (ns-vars . "(cljs.repl/dir %s)")
255
+ (set-ns . "(in-ns '%s)")
256
+ (macroexpand . "(cljs.core/macroexpand '%s)")
257
+ (macroexpand-1 . "(cljs.core/macroexpand-1 '%s)"))))
258
+ ```
259
+
260
+ If you want to add a new repl type, just `(add-to-list
261
+ 'inf-clojure-repl-features (cons new-repl-type '((doc
262
+ . "(myrepl/doc-command %s") ...)))`
263
+
264
+ If you want to update a specific form there is a function
265
+ ` inf-clojure-update-repl-feature ` which can be used like so:
266
+
267
+ ``` emacs-lisp
268
+ (inf-clojure-update-feature 'clojure 'completion "(complete.core/completions \"%s\")")
269
+ ```
270
+
246
271
#### REPL Type
247
272
248
- An ` inf-clojure ` REPL can be of different types: Clojure, ClojureScript, Lumo
249
- and Planck are all potentially valid options.
273
+ An ` inf-clojure ` REPL can be of different types: Clojure,
274
+ ClojureScript, Lumo and Planck are all potentially valid options.
250
275
251
- At the moment, the default Clojure REPL, the Lumo REPL, the Planck REPL and the
252
- Joker REPL are supported (standard ClojureScript is lacking mostly because some
253
- features require to access the compiler state,
254
- [ cljs-tooling] ( https://github.com/clojure-emacs/cljs-tooling ) is a good
255
- candidate for enabling support).
276
+ At the moment, the default Clojure REPL, the Lumo REPL, the Planck
277
+ REPL and the Joker REPL are supported.
256
278
257
- What does it mean that a REPL type is supported - well it means that ` inf-clojure `
258
- would use the proper code internally to power commands like definition lookup and friends.
259
- Those differ from REPL to REPL and can't be implemented in a REPL-independent way. At
260
- boot type ` inf-clojure ` tries to detect the type of the REPL that was started and uses
261
- this type to dispatch the proper code for the respective REPL type.
279
+ What does it mean that a REPL type is supported - well it means that
280
+ ` inf-clojure ` would use the proper code internally to power commands
281
+ like definition lookup and friends. Those differ from REPL to REPL
282
+ and can't be implemented in a REPL-independent way. At startup
283
+ ` inf-clojure ` tries to detect the type of the REPL that was started
284
+ and uses this type to dispatch the proper code for the respective REPL
285
+ type.
262
286
263
287
By default ` inf-clojure ` would start a standard Clojure REPL using
264
288
` lein ` or ` boot ` but you can easily change this. To boot some other REPL just use the
0 commit comments