rewrite-clj

orestis 2022-01-25T19:25:29.003400Z

Is there a technique to insert nodes and keep the previous line indentation? In my case I want to add an entry to a require clause at a specific location and match the current file’s indentation

orestis 2022-01-25T19:27:32.005700Z

Also, am I correct to think that since the insert-* functions don't move the position of the zipper, the correct sequence is: 1. Find sibling node 2. Insert-right new ns 3. insert right new line 4. Insert right n spaces

orestis 2022-01-25T19:28:05.006600Z

I'm trying to figure this out at the REPL but for some reason I get confused. Probably a morning task :)

lread 2022-01-25T20:08:37.008600Z

@orestis if you scroll back to Sept 25th-ish of last year in this channel, you’ll find a Q&A that might cover your issue. Lemme know!