@@ -103,39 +103,65 @@ point. You can, however, change this behaviour by invoking such
103
103
commands with a prefix argument. For instance: ` C-u C-c C-v ` will ask
104
104
for the symbol you want to show the docstring for.
105
105
106
- #### Starting and connecting to a socket server
106
+ #### Starting and connecting to a socket REPL
107
107
108
- For Leiningen, add the following option to your ~ /.lein/profiles.clj or your project.clj:
108
+ If you have the new [ Clojure CLI tools] [ ] installed you can use the ` clojure ` command:
109
+
110
+ _ do not use ` clj ` because it adds readline support_
111
+
112
+ ``` shell
113
+ clojure -J-Dclojure.server.repl=" {:port 5555 :accept clojure.core.server/repl}"
109
114
```
110
- :jvm-opts ["-Dclojure.server.repl={:port 5555 :accept clojure.core.server/repl}"]
115
+
116
+ Then either ` C-c M-c RET localhost RET 5555 ` from within Emacs or add the following to your ` .dir-locals.el ` :
117
+
118
+ ``` el
119
+ ((nil . ((inf-clojure-tools-deps-cmd . ("localhost" . 5555)))))
111
120
```
112
121
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 `
122
+ or the following to your [ Emacs init file] [ ] :
123
+
124
+ ``` el
125
+ (setf inf-clojure-tools-deps-cmd '("localhost" . 5555)):
116
126
```
117
- ((nil . ((inf-clojure-lein-cmd . ("localhost" . 5555)))))
127
+
128
+ For Leiningen, add the following option to your ` ~/.lein/profiles.clj ` or your ` project.clj ` :
129
+
130
+ ``` clojure
131
+ :jvm-opts [" -Dclojure.server.repl={:port 5555 :accept clojure.core.server/repl}" ]
118
132
```
119
- or the following to your ` .emacs `
133
+
134
+ Then run ` lein repl ` from within your project directory to start the REPL, and either ` C-c M-c RET localhost RET 5555 ` from within Emacs or add the following to your ` .dir-locals.el ` :
135
+
136
+ ``` el
137
+ ((nil . ((inf-clojure-lein-cmd . ("localhost" . 5555)))))
120
138
```
139
+
140
+ or the following to your [ Emacs init file] [ ] :
141
+
142
+ ``` el
121
143
(setf inf-clojure-lein-cmd '("localhost" . 5555))
122
144
```
123
145
124
- For boot, export the environment variable BOOT_JVM_OPTIONS:
125
- ```
146
+ For boot, export the environment variable ` BOOT_JVM_OPTIONS ` :
147
+
148
+ ``` shell
126
149
export BOOT_JVM_OPTIONS=' -Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}"'
127
150
```
151
+
128
152
or add the following to your ` .dir-locals.el ` :
129
- ```
153
+
154
+ ``` el
130
155
((nil . ((inf-clojure-boot-cmd . ("localhost" . 5555)))))
131
156
```
132
- or the following to your ` .emacs `
133
- ```
157
+
158
+ or the following to your [ Emacs init file] [ ] :
159
+
160
+ ``` el
134
161
(setf inf-clojure-boot-cmd '("localhost" . 5555))
135
162
```
136
163
137
- You can also start a socket server via the [ Clojure CLI tools] ( https://clojure.org/guides/getting_started ) .
138
- Configuration options are described [ here] ( https://dev.clojure.org/display/design/Socket+Server+REPL ) .
164
+ The socket server REPL configuration options are described [ here] ( https://dev.clojure.org/display/design/Socket+Server+REPL ) .
139
165
140
166
#### Caveats
141
167
@@ -320,3 +346,5 @@ Distributed under the GNU General Public License; type <kbd>C-h C-c</kbd> to vie
320
346
[ contributors ] : https://github.com/clojure-emacs/inf-clojure/contributors
321
347
[ melpa ] : http://melpa.org
322
348
[ melpa stable ] : http://stable.melpa.org
349
+ [ Emacs init file ] : https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html
350
+ [ Clojure cli tools ] : https://clojure.org/guides/getting_started
0 commit comments