Skip to content

Commit b87c5fb

Browse files
priyatamarichiardi
authored andcommitted
update instructions to setup lumo repl (#147)
thanks @arichiardi!
1 parent 1295e58 commit b87c5fb

File tree

1 file changed

+41
-11
lines changed

1 file changed

+41
-11
lines changed

README.md

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Clojure(Script) development:
2828
* Support for Lumo
2929
* Support for Planck
3030

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).
3232

3333
## Installation
3434

@@ -62,22 +62,26 @@ Add the following to your Emacs config to enable
6262
(add-hook 'clojure-mode-hook #'inf-clojure-minor-mode)
6363
```
6464

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.**
6868

6969
## Usage
7070

7171
Just invoke `M-x inf-clojure` or press `C-c C-z` within a Clojure source file.
7272
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.
7476

7577
`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.
8185

8286
By default all those variables are set to strings (e.g. `lein repl`).
8387
However, it is possible to use a cons pair like `("localhost" . 5555)`
@@ -167,6 +171,32 @@ or the following to your [Emacs init file][]:
167171

168172
The socket server REPL configuration options are described [here](https://dev.clojure.org/display/design/Socket+Server+REPL).
169173

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+
170200
#### Caveats
171201

172202
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
301331
the classpath) in your `.dir-locals.el`:
302332

303333
```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 "
305335
(f-read (concat (inf-clojure-project-root) "cp")))))))
306336
```
307337

0 commit comments

Comments
 (0)