File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ Add the following to your Emacs config to enable
46
46
(add-hook 'clojure-mode-hook #'inf-clojure-minor-mode)
47
47
```
48
48
49
+ ` inf-clojure-program ` is a custom variable that defines a program to run
50
+ or the tcp socket to connect to when starting ` inf-clojure ` . By default
51
+ this var is set to ` lein repl ` , which will start a repl via leiningen.
52
+ However, it is possible to use a cons pair like ` ("localhost" . 5555) ` to
53
+ connect to a socket repl like the one provided with [ planck] ( http://planck-repl.org/ ) ,
54
+ which can be started from the command line with ` planck -n 5555 ` .
55
+
49
56
** Don't enable ` inf-clojure-minor-mode ` and ` cider-mode ` at the same
50
57
time. They have overlapping functionality and keybindings and the
51
58
result will be nothing short of havoc.**
Original file line number Diff line number Diff line change @@ -139,8 +139,11 @@ The following commands are available:
139
139
#'inf-clojure-completion-at-point ))
140
140
141
141
(defcustom inf-clojure-program " lein repl"
142
- " Program name for invoking an inferior Clojure in Inferior Clojure mode."
143
- :type 'string
142
+ " Either a program name or a connection cons pair consisting of a host
143
+ and port number (e.g. (\" localhost\" . 5555)), for invoking an inferior Clojure
144
+ in Inferior Clojure mode."
145
+ :type '(choice (string )
146
+ (cons string integer))
144
147
:group 'inf-clojure )
145
148
146
149
(defcustom inf-clojure-load-command " (clojure.core/load-file \" %s\" )\n "
@@ -322,7 +325,9 @@ of `inf-clojure-program'). Runs the hooks from
322
325
(if (not (comint-check-proc " *inf-clojure*" ))
323
326
; ; run the new process in the project's root when in a project folder
324
327
(let ((default-directory (inf-clojure-project-root))
325
- (cmdlist (split-string cmd)))
328
+ (cmdlist (if (consp cmd)
329
+ (list cmd)
330
+ (split-string cmd))))
326
331
(set-buffer (apply #'make-comint
327
332
" inf-clojure" (car cmdlist) nil (cdr cmdlist)))
328
333
(inf-clojure-mode)))
You can’t perform that action at this time.
0 commit comments