@@ -28,7 +28,7 @@ Clojure(Script) development:
28
28
* Support for Lumo
29
29
* Support for Planck
30
30
31
- For a more powerful/full-featured solution see [ CIDER] [ ] .
31
+ For a more powerful/full-featured solution see [ CIDER] ( https://github.com/clojure-emacs/cider ) .
32
32
33
33
## Installation
34
34
@@ -62,22 +62,26 @@ Add the following to your Emacs config to enable
62
62
(add-hook 'clojure-mode-hook #'inf-clojure-minor-mode)
63
63
```
64
64
65
- ** Don't enable ` inf-clojure-minor-mode ` and ` cider-mode ` at the same
66
- time. They have overlapping functionality and keybindings and the
67
- result will be nothing short of havoc.**
65
+ ** Don't enable ` inf-clojure-minor-mode ` and ` cider-mode ` at the same time. They
66
+ have overlapping functionality and keybindings and the result will be nothing
67
+ short of havoc.**
68
68
69
69
## Usage
70
70
71
71
Just invoke ` M-x inf-clojure ` or press ` C-c C-z ` within a Clojure source file.
72
72
This will start a REPL process for the current project and you can start
73
- interacting with it.
73
+ interacting with it. By defaul this will look for ` lein ` command on the path.
74
+
75
+ For configuring other repls, read below.
74
76
75
77
` inf-clojure ` has several custom variables which control the command used to
76
- start a REPL for particular project type - ` inf-clojure-lein-cmd ` ,
77
- ` inf-clojure-boot-cmd ` , ` inf-clojure-tools-deps-cmd ` and
78
- ` inf-clojure-generic-cmd ` . The ` inf-clojure-project-type ` can force a
79
- particular project type, skipping the project detection, which can be useful
80
- for projects that don't have standard layouts.
78
+ start a REPL for particular project type - ` inf-clojure-lein-cmd ` (lein),
79
+ ` inf-clojure-boot-cmd ` (boot), ` inf-clojure-tools-deps-cmd ` (clj cli) and
80
+ ` inf-clojure-generic-cmd ` (lumo).
81
+
82
+ The ` inf-clojure-project-type ` can force a particular project type, skipping the
83
+ project detection, which can be useful for projects that don't have standard
84
+ layouts.
81
85
82
86
By default all those variables are set to strings (e.g. ` lein repl ` ).
83
87
However, it is possible to use a cons pair like ` ("localhost" . 5555) `
@@ -167,6 +171,32 @@ or the following to your [Emacs init file][]:
167
171
168
172
The socket server REPL configuration options are described [ here] ( https://dev.clojure.org/display/design/Socket+Server+REPL ) .
169
173
174
+ #### Lumo Socket REPL
175
+
176
+ For lumo, setup a generic command in ` init.el ` to start the socket repl (say, port 5555)
177
+
178
+ ``` el
179
+ (setq inf-clojure-repl-use-same-window nil)
180
+ (setq inf-clojure-generic-cmd '("localhost" 5555))
181
+ ```
182
+
183
+ Then start lumo repl, like so:
184
+
185
+ ``` bash
186
+ lumo -n 5555
187
+ ```
188
+
189
+ If you want to use lumo with Clojure devtools
190
+ [ dependencies] ( https://clojure.org/guides/deps_and_cli ) without lein or boot,
191
+ add a ` deps.edn ` in the project root and run this command:
192
+
193
+ ``` bash
194
+ lumo -c ` clj -Spath` -n 5555
195
+ ```
196
+
197
+ You can use ` M-x inf-clojure-connect ` (` C-c M-c ` ) to connect to a running
198
+ socket-repl. You will be prompted for host and port.
199
+
170
200
#### Caveats
171
201
172
202
Note that if you decide _ NOT_ to use the socket repl, it is highly recommended
@@ -301,7 +331,7 @@ For example, you can use the following command (assuming `cp` contains
301
331
the classpath) in your ` .dir-locals.el ` :
302
332
303
333
``` el
304
- ((nil . (eval . (setq inf-clojure-boot -cmd (concat "lumo -d -c "
334
+ ((nil . (eval . (setq inf-clojure-generic -cmd (concat "lumo -d -c "
305
335
(f-read (concat (inf-clojure-project-root) "cp")))))))
306
336
```
307
337
0 commit comments