-
Start nrepl on remote server and get it listening port (see Note 1 for details);
-
On client: ssh user@remote_server;
-
$ lein nrepl :connect localhost:port;
Note 1:
-
Start nrepl in command-line: use
ps -ef ...
; -
Start nrepl in Emacs: use C-c M-d to get port;
Note 2:
-
test: nc -zv ip port;
-
Display current REPL connection details: C-c M-d
-
Search forward/reverse through command history with regex: M-s/M-r
-
Search the previous/next item in history using the current input as search pattern: M-p M-n
-
Close any unmatched parenthesis and then evaluate the current input: C-RET
Ref: https://github.com/clojure-emacs/nrepl.el