I really enjoy spacemacs and I enjoy it even more with @jr0cket guides.
Thank you @jr0cket !
I need some help regarding a weird behaviour on Spacemacs from terminal: when I switch to another app while being in a Clojure buffer, a []
is inserted automatically.
I have no idea where this behaviour comes from. Interestingly, it doesn’t happen on Spacemacs GUI
Solved it with https://github.com/luxbock/evil-cleverparens/issues/58#issuecomment-717419683
@jr0cket it might worth mentioning it in your documentation. This weird behaviour drove me crazy!!!
@viebel thanks for the information. I believe the issue describes a way to check for terminal and set keys differently. This type of configuration has been done in Spacemacs layers before, so would be a useful addtion as a PR. I could add a Spacemacs in Terminal page to the book, to highlight the edge cases like this. I'll add an issue to the Practicalli Spacemacs book and read through the cleverparents issue in more detail.
I am following the Brave Clojure tutorial to get it up and running in Windows 10. However, CIDER jack-in-clj can't successfully start my REPL. Instead, I get an attempting to connect message followed by what looks like a stack trace that disappears before I can copy it or even screenshot it. Has anyone had success getting CIDER jack-in-clj to work (on Windows 10) through the usual means? The only way I can get a REPL running in Spacemacs is to do the following: • Go to terminal • Type "lein repl :headless" • Note down the host address and port (e.g. 127.0.0.1:57844) • Use cider-connect and type in the host address and port manually
@aaronsama Have you tried looking in the message buffer for errors, SPC b m
Cider should send messages there, along with the startup command its using for cider-jack-in.
Following the Emacs setup in Brave Clojure is more than a little dated as far as I am aware and I would be surprised if it worked on any platform. There maybe updates in the brave clojure repos, but havent checked.
If using Windows 10, then Windows Subsystem for Linux (WSL) is recommended approach, assuming someone is okay using the basics of a Linux terminal.
Otherwise the Clojure Scoop for Windows is recommended for running directly on Windows. The scoop includes several very useful tools.
https://github.com/littleli/scoop-clojure/wiki/Getting-started
For any other approach or if these approaches do not work, suggest trying the #clj-on-windows channel for help or perhaps #leiningen channel.
When starting with Clojure it doesnt really matter if you use Leiningen of Clojure CLI tools, although eventually I would encourage you to use the Clojure CLI tools.
OK, thank you for that tip. I've got the stack trace:
error in process sentinel: Could not start nREPL server: java.lang.NumberFormatException: Invalid number: 0.8.3
at clojure.lang.LispReader.readNumber (LispReader.java:352)
clojure.lang.LispReader.read (LispReader.java:278)
clojure.lang.LispReader.readDelimitedList (LispReader.java:1398)
clojure.lang.LispReader$VectorReader.invoke (LispReader.java:1347)
clojure.lang.LispReader.read (LispReader.java:285)
clojure.lang.LispReader.read (LispReader.java:216)
clojure.lang.LispReader.read (LispReader.java:205)
clojure.lang.RT.readString (RT.java:1878)
clojure.lang.RT.readString (RT.java:1873)
clojure.core$read_string.invokeStatic (core.clj:3815)
clojure.core$read_string.invoke (core.clj:3805)
clojure.core$mapv$fn__8445.invoke (core.clj:6912)
clojure.core.protocols$fn__8159.invokeStatic (protocols.clj:168)
clojure.core.protocols/fn (protocols.clj:124)
clojure.core.protocols$fn__8114$G__8109__8123.invoke (protocols.clj:19)
clojure.core.protocols$seq_reduce.invokeStatic (protocols.clj:31)
clojure.core.protocols$fn__8146.invokeStatic (protocols.clj:75)
clojure.core.protocols/fn (protocols.clj:75)
clojure.core.protocols$fn__8088$G__8083__8101.invoke (protocols.clj:13)
clojure.core$reduce.invokeStatic (core.clj:6828)
clojure.core$mapv.invokeStatic (core.clj:6903)
clojure.core$mapv.invoke (core.clj:6903)
leiningen.update_in$parse_args.invokeStatic (update_in.clj:13)
leiningen.update_in$parse_args.invoke (update_in.clj:9)
leiningen.update_in$update_in.invokeStatic (update_in.clj:36)
leiningen.update_in$update_in.doInvoke (update_in.clj:24)
clojure.lang.RestFn.applyTo (RestFn.java:146)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:660)
leiningen.core.main$partial_task$fn__7331.doInvoke (main.clj:284)
clojure.lang.RestFn.applyTo (RestFn.java:139)
clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.core$apply.invokeStatic (core.clj:667)
clojure.core$apply.invoke (core.clj:660)
leiningen.core.main$apply_task.invokeStatic (main.clj:334)
leiningen.core.main$apply_task.invoke (main.clj:320)
leiningen.core.main$resolve_and_apply.invokeStatic (main.clj:343)
leiningen.core.main$resolve_and_apply.invoke (main.clj:336)
leiningen.core.main$_main$fn__7420.invoke (main.clj:453)
leiningen.core.main$_main.invokeStatic (main.clj:442)
leiningen.core.main$_main.doInvoke (main.clj:439)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.lang.Var.applyTo (Var.java:705)
clojure.core$apply.invokeStatic (core.clj:665)
clojure.main$main_opt.invokeStatic (main.clj:514)
clojure.main$main_opt.invoke (main.clj:510)
clojure.main$main.invokeStatic (main.clj:664)
clojure.main$main.doInvoke (main.clj:616)
clojure.lang.RestFn.applyTo (RestFn.java:137)
clojure.lang.Var.applyTo (Var.java:705)
clojure.main.main (main.java:40)
WSL isn't an option for me as this is a work machine and is locked down. I will take a look at the scoop and the channels you suggested to see if I can get Clojure working natively in Windows.
Searching around for that error message leads to https://github.com/clojure-emacs/cider/issues/2890