That used to be a problem, but Claude Code has been doing fine at it for a few months now.
Agreed. For the others, I asked Claude to write a structural edit tool: s-expressions only, insert/replace/... When passed 'tree' it prints a file like
<line>: <s-expr .-separated path>
then eg when passed 'replace 2.1 "(+ x y)"' it returns a new file (as a list of s-exprs).
I’ve been struggling with this. I use Clojure and clj-paren-repair has been helpful (https://github.com/bhauman/clojure-mcp-light/blob/main/src/c...), but it would be even better if the model could be taught to do structural editing, the same way I do in Emacs.
Do you have something in a public repository I can look at?
Thanks, appreciate this also, vibe coding in my own lisp and this has been frustrating
That's good to know. The open weight models are still pretty awful getting stuck in this loop