2022-10-20

Published: Nov 01, 2022Last modified: Apr 05, 2023
Word count: 355

clawe's debug namespace

lispyville in clojurians doom-emacs channel

https://clojurians.slack.com/archives/C01GE5PD249/p1666289689445859 I love structured editing - I dove in fully a few years ago, and it's quite nice at this point. I think of it as similar to clojure in general - it's excellent, and soon you'll be a bit annoyed when you don't have it everywhere.

It definitely has a learning curve, my memory is a couple weeks of wrestling in it to adjust to the new keybindings, stop old habits, and decide what pieces (key themes) of lispyville to add, keep, or drop.

I use evil+lispyville, and not the doom lispy module. I don't remember exactly why - I'd expect I wanted to add more key themes slowly, so it made more sense to own that config myself. My config is here: https://github.com/russmatney/dotfiles/blob/176270d00440fd2141144161c20a7c88a8881714/emacs/.doom.d/+lisp-editing.el#L21-L77

Some things I like:

  • it's quite convenient to drag lists and expressions around (`M-j` and `M-k` to swap the expression at point with the one above or below it) - this is the same behavior (and binding) as re-ordering lists/paragraphs in org-mode.
  • I love insert-at-end-of-list `M-a` (tho i wrote a modified version that adds a newline, see my config)
  • I _love_ yanking arbitrary lists arounds with `d-a-l`, `y-a-l`. This makes it really nice to grab whole function impls or call-sites and paste them elsewhere.

I agree about the pain when handling strings and comments as atoms - it's nice for the dragging use-cases, but I get annoyed at times - they don't edit as well as the rest of the code.

  • swapping lines inside a doc string doesn't work b/c instead the whole list you're in moves
  • deleting one quote on a string is wonky to recover from (usually you need to undo before all hell breaks loose, and try to delete both quotes at the same time)

Could just be my config, or me not knowing the expected way to deal with it... the surface area of functions (between lispy and lispyville) is huge - it's alot to grok.