Fork me on GitHub
#spacemacs
<
2021-05-12
>
craftybones06:05:10

If I want to use spacemacs, but plug directly into a Clojure CLI(not nrepl), what are my options?

practicalli-johnny08:05:04

As I understand it, a REPL is an external process that requires a protocol to connect. This is the case when running a repl with either Leiningen or Clojure CLI tools (i.e. cider-jack-in). nrepl is by far the most common protocol and enables a rich set of features via the Cider package. Other options I am aware of are socket REPL and prepl. Socket REPL is part of the Clojure library, so included in any project that has org.clojure/clojure as a dependency. https://github.com/clojure-emacs/inf-clojure is an Emacs project that uses Socket REPL to connect to a running REPL, providing what they describe as essential features (a sub-set of features you would get with Cider & nrepl). I am assuming this would be used instead of the Clojure layer, so you would need to add as additional-packages or create/find a private Spacemacs layer for inf-clojure.

practicalli-johnny08:05:47

https://github.com/practicalli/clojure-deps-edn#alternative-repls has examples of running a repl with different protocols, such as socket repl

practicalli-johnny08:05:45

https://oli.me.uk/clojure-socket-prepl-cookbook/ may give some insight into using these alternative protocols for connecting to a repl.

practicalli-johnny10:05:07

I would be interested to hear how you get on, as I have only ever used nREPL myself. Thank you.

practicalli-johnny11:05:46

Added a short page on using Magit to checkout a branch from a remote repository to the Magit section of Practicalli Spacemacs. Anything else that would be useful to add? https://practicalli.github.io/spacemacs/source-control/magit/remote-repositories/checkout-remote-branch.html

West19:05:21

Gotta add `SPC g m` or `C-c C-c` for magit dispatch. It shows all the useful commands, including push pull commit etc. Took me so long to find that menu. Also C-g to exit that menu (not sure if it has a spacemacs-like binding).

West19:05:21

Gotta add `SPC g m` or `C-c C-c` for magit dispatch. It shows all the useful commands, including push pull commit etc. Took me so long to find that menu. Also C-g to exit that menu (not sure if it has a spacemacs-like binding).

practicalli-johnny21:05:02

@c.westrom so it seems magit-dispatch is like having all the commands available from the magit-status buffer without having the magit-status buffer. Is that about right??

West22:05:18

Yes. It's also nice to have even while in magit status. That's how I found the other controls for staging and discarding changes.

practicalli-johnny22:05:28

Interesting. I use the ? key binding in magit status buffer to see the magit commands. It seems to be the same as running magit-dispatch when also in the magit-buffer.