Skip to content

Commit fcf30b5

Browse files
committed
README: Add instructions for including socket config in .dir-locals.el or .emacs.
1 parent 7bf6f3d commit fcf30b5

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,29 @@ For Leiningen, add the following option to your ~/.lein/profiles.clj or your pro
110110
:jvm-opts ["-Dclojure.server.repl={:port 5555 :accept clojure.core.server/repl}"]
111111
```
112112

113-
Then run `lein repl` from within your project directory to start the REPL, and `C-c M-c RET localhost RET 5555` from within Emacs to connect.
113+
Then run `lein repl` from within your project directory to start the
114+
REPL, and `C-c M-c RET localhost RET 5555` from within Emacs to
115+
connect, or add the following to your `.dir-locals.el`
116+
```
117+
((nil . ((inf-clojure-lein-cmd . ("localhost" . 5555)))))
118+
```
119+
or the following to your `.emacs`
120+
```
121+
(setf inf-clojure-lein-cmd '("localhost" . 5555))
122+
```
114123

115124
For boot, export the environment variable BOOT_JVM_OPTIONS:
116125
```
117126
export BOOT_JVM_OPTIONS='-Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}"'
118127
```
128+
or add the following to your `.dir-locals.el`:
129+
```
130+
((nil . ((inf-clojure-boot-cmd . ("localhost" . 5555)))))
131+
```
132+
or the following to your `.emacs`
133+
```
134+
(setf inf-clojure-boot-cmd '("localhost" . 5555))
135+
```
119136

120137
You can also start a socket server via the [Clojure CLI tools](https://clojure.org/guides/getting_started).
121138
Configuration options are described [here](https://dev.clojure.org/display/design/Socket+Server+REPL).

0 commit comments

Comments
 (0)