@@ -103,6 +103,40 @@ 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
107
+
108
+ For Leiningen, add the following option to your ~ /.lein/profiles.clj or your project.clj:
109
+ ```
110
+ :jvm-opts ["-Dclojure.server.repl={:port 5555 :accept clojure.core.server/repl}"]
111
+ ```
112
+
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
+ ```
123
+
124
+ For boot, export the environment variable BOOT_JVM_OPTIONS:
125
+ ```
126
+ export BOOT_JVM_OPTIONS='-Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}"'
127
+ ```
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
+ ```
136
+
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 ) .
139
+
106
140
#### Caveats
107
141
108
142
Note that if you decide _ NOT_ to use the socket repl, it is highly recommended
0 commit comments