Hacker News new | ask | show | jobs
by amboo7 110 days ago
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).

1 comments

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