Fork me on GitHub
#spacemacs
<
2019-07-18
>
lread11:07:45

I wonder how hard it would be to update cider docs to also include spacemacs keystrokes.

lread12:07:06

I donโ€™t think any cider authors are spacemacs users(?)

practicalli-johnny13:07:17

The docs in the Clojure layer for Spacemacs give you a good overview of the keybindings, however, its more like a cheetsheet. I would be happy to work on some pull requests to improve the Clojure layer docs if you think its helpful.

lread13:07:41

Your work is wonderful and I refer to it often!

practicalli-johnny13:07:51

One day it will be finished ๐Ÿ™‚

practicalli-johnny13:07:45

I can discuss getting some Spacemacs specific stuff added to the CIDER docs. Or maybe just a reference to Spacemacs specific documentation from http://docs.cider.mx

lread13:07:21

I was more thinking that while reading through cider docs, having those spacemacs cider commands right there would be so cool. Keeping it up to date would also be a good way to ensure that our clojure layer is not missing any cider goodness. But all this would take time and ongoing interest.

lread13:07:44

Just thinking out loud, I suppose the cider docs could have a toggle for emacs and spacemacs and the appropriate keystrokes would show.

practicalli-johnny14:07:40

I did think about having a toggle on the Practicalli Spacemacs book, between Evil an Holy modes. This did feel better than my first attempt at putting them both together. It felt very heavy going. Instead I just focused on the Evil style.

practicalli-johnny14:07:56

I will have a chat at some point with the CIDER team and see what they think. Or fee free to ask in the #cider channel. They are a friendly bunch in there, especially when you are willing to help make CIDER better.

lread16:07:07

Thanks @jr0cket, Iโ€™m going to wait a bit until I can commit to helping.

eggsyntax18:07:48

Just did a round of upgrades of spacemacs (to latest on develop as of a week or so ago) and packages. The biggest upgrade issue I've encountered is that when I jack-in or connect a repl, it now starts in user rather than the namespace marked as :main in the project.clj file. Anyone else encountered this? If so, have you found a solution?

practicalli-johnny19:07:08

@eggsyntax I think someone mentioned that their repl was only starting in user namespace in either the #cider or possibly #emacs channel

๐Ÿ™ 4
practicalli-johnny19:07:11

It seems you should use :init-ns to define the namespace and not rely on :main - assuming this is a Leiningen project

practicalli-johnny19:07:07

@eggsyntax maybe they just fixed the feature that used main incorrectly ๐Ÿ™‚

eggsyntax19:07:53

Yeah, that seems very plausible. Many thanks!

practicalli-johnny19:07:11

I just updated my develop branch and everything is working very smoothly. I would be interested to here if you have any issues, especially around Clojure. There are also some more Clojure mode keybindings now ๐Ÿ™‚

eggsyntax20:07:23

When you say "working very smoothly," do you mean you're seeing the old behavior again (starting the CIDER REPL in the :main ns if :init-ns isn't there)? I'm definitely not seeing that. Oddly, {:repl-options {:init-ns foo.core}} doesn't seem to change behavior either. My main suggestion so far re the keybindings -- it's nice to have the jack-in options organized, but I'd suggest keeping , s i bound to cider-jack-in-clj, as the most common case, while also having it bound to your new binding of , s j c.

practicalli-johnny19:07:10

Interesting, I assumed that , ' would be the most common way to cider-jack-in. Do you not use this keybinding?

eggsyntax12:07:27

I don't. Part of that is probably just habit, and part is that it's an awkward sequence in dvorak (left ring finger off home row, then left pinky off home row). That said, I had forgotten its existence when I made the suggestion. I retract the suggestion, if there is already a top-level shortcut and now a third-level shortcut, no need for a second level shortcut :-)

eggsyntax12:07:08

(if you're responding, I'd love to hear an answer to the question before the key findings suggestion, that would be useful info!)

practicalli-johnny06:07:13

I assume you are asking about setting the namespace. I don't usually do that, but it is nice to know how. I will test and see what works and let you know

practicalli-johnny06:07:49

I created https://github.com/jr0cket/defaulting-the-namespace and when I run with cider-jack-in then it sets the namespace to that defined in :main

practicalli-johnny06:07:27

This was with Leiningen version 2.8.3. I will check with the latest version to see if it still works.

practicalli-johnny06:07:49

It still works with Leiningen 2.9.1

practicalli-johnny07:07:04

I updated the packages recently and am on CIDER 0.22.0snapshot (package: 20190708.1036)

practicalli-johnny07:07:42

The cider-jack-in command is [nREPL] Starting server via /home/jr0cket/bin/lein update-in :dependencies conj \[nrepl\ \"0.6.0\"\] -- update-in :plugins conj \[refactor-nrepl\ \"2.5.0-SNAPSHOT\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.22.0-beta8\"\] -- repl :headless :host localhost...

practicalli-johnny07:07:31

If can also successfully add a new namespace and set that to be the default using ;repl-options {:init-ns }. I just pushed that to the above git repository

eggsyntax13:07:16

Oh, interesting. Thanks @jr0cket, that's really helpful!

eggsyntax19:07:55

Cool, I'll give it a shot!