Editing of the Repl Driven Development video with Spacemacs has been completed. The edited video is now rendering and if I can stay awake long enough will be uploaded to YouTube soon, or in about 8 hours if I fall asleep first :)
Presents have come early this year and the new video is available at https://youtu.be/NDrpclY54E0 The SD version has just finished processing, so you may need to wait a little while for the HD version. This is a 30 minute video and should cover the important aspects of REPL driven development. This is the first pre-recorded video I have done for a while, and the one that has taken the longest, so positive and constructive feedback is as always welcome. Thank you
Many thanks for making this. Iāve been watching bits of it today in between re:Clojure talks. Iāve already learned a few things (and Iāve been using Spacemacs for a while now).
One thing that Iām struggling with is key bindings. Iām using the emacs key bindings (I never learned vi/vim). I assumed that the key bindings for Spacemacs things would be the same, with <space> replaced by meta-m but there were a few things that you do in the video that I canāt figure out.
I guess the question is, how do I actually look up the key bindings for stuff like cider and clojure-mode in Spacemacs? I guess I can do C-h b
and then search through a really long list of things. Is that the best way?
@cdpjenkins SPC SPC is the same as M-x and in fact I am sure M-x is the usual Emacs command. Using that and typing a pattern will fuzzy match on names. If you do that in the relevant major mode it will show the key bindings next to the commands it lists (assuming they have key bindings). A command may only have a key binding in a particular major mode. TAB in the list of commands will show the docs for the command under the cursor without having to select the command
When developing Clojure, use M-RET
or M-m m
in Emacs state to select the major mode menu (this is the same as when I use ,
in Evil normal state). This major mode will give you access to all the Cider related commands. When you see me do , e f
to evaluate an expression you would do M-RET e f
or M-m m e f
SPC h d
is a menu with key bindings for describing all sorts of Emacs things... commands, variables, faces, etc.
If there is anything thatās not clear, just share the time index on the video and happy to elaborate
Ah brilliant, thanks. The thing that I had missed is that M-m
in emacs mode is equivalent to ,
in vi mode (I thought it was equivalent to SPC
).
(You might be able to imagine me watching your video and furiously hitting M-m , ā¦.
and getting frustrated when I couldnāt find anythingā¦)
That is a very good point. I've added the Emacs M-m
key binding to the comment on the video to help others who may be using Emacs. Thanks.
Awesome thanks.
Something else I noticed: your Spacemacs setup has a few things set up that I donāt have, like company-mode. Is there anywhere that I can look in order to figure out how to get that working with spacemacs?
I already tried adding the following to my .spacemacs
`:
(global-company-mode t)
in user-config
and
(auto-completion :variables auto-completion-use-company-box t)
in dotspacemacs-configuration-layers
ā¦ I now get autocomplete but not company-mode
working in Clojure source code buffers. šI noticed you also had flycheck set up and workingā¦ is there some obvious spacemacs setup step that I might have missed off?
My .spacemacs config is here... its the init.el file in .spacemacs.d https://github.com/practicalli/spacemacs.d/
Many thanks. I confess I canāt get yours to work on my emacs (and I canāt figure out what is meaningfully different between yours and mind) but will spend some more time on it. If I canāt figure it out, where would be the best place to ask for help? (Iām guessing that this isnāt the best place š )
are you aware you cant have both a .spacemacs
and a .spacemacs.d
configuration, the .spacemacs will take preference
The flycheck needs the syntax-checking
layer and then add clojure-enable-linters 'clj-kondo
as a variable to the clojure layer. Assuming you are using Spacemacs develop
(clojure :variables
clojure-toplevel-inside-comment-form t
cider-overlays-use-font-lock t
cider-preferred-build-tool 'clojure-cli
clojure-enable-linters 'clj-kondo
clojure-enable-clj-refactor t)
Ah so it turns out I donāt have a working clj-kondo and I certainly donāt have the clojure-enable-linters 'clj-kondo
config so I will try to get that working - thank you!
Suggest checking your .spacemacs
file against the template, to see if there have been any updates. SPC f e D
will open ediff with the relevant files. This should be done each time you update Spacemacs itself (not the packages, but pulling a new version of the spacemacs code in .emacs.d
Of course you will know that having read my book š https://practicalli.github.io/spacemacs/install-spacemacs/update.html
^^^ I totally need to read that
I now have clj-kondo working šā¦ still lots more to figure out but Iāll have another look at the book when I get some more time.
Many thanks John - you rule!
If you get stuck for more than a few minutes, just ask quesions...
Cool I will totally take you up on that - thank you š
Iām definitely getting thereā¦ A few weeks ago, I was still on my circa-2013 custom emacs config and Iāve switched to Spacemacs and got most of the things working (and many new things that Spacemacs sets up for me so I donāt have to). Iām now fairly productive working in Clojure again (or at least productive as someone with very rusty Clojure skills can be) so Iām very grateful for that!