Question about Evil Cleverparens safe structural editing
Example code:
(fn [a b]
(fn-with a)
(fn-with b))
So if I delete last line with d d then closing parens is moved to line above as expected. But when I just need to comment out last line, using SPC ; ; result is unbalanced code:
(fn [a b]
(fn-with a)
;; (fn-with b))
Is there any solution for this?(sorry I don't use spacemacs, but I have notifications for evil as the maintainer) - what function is SPC ; ; calling? As evil-cleverparens doesn't do commenting-out, I assume it's a lib like evil-comentary or evil-nerd-commenter which may be to blame.
evilnc-comment-operator I guess?
yeah, so I just checked, evil-nerd-commenter doesn't do "structural commenting"
I don't maintain either, but I do maintain evil-cleverparens. I could have a think about whether it should intercept/override evil-commentary and evil-nerd-commenter to add structural sensitivity, or even just provide bindings of it's own 🤔
If you have any thoughts, feel free to leave an issue on the evil-cleverparens github issue page
Right now, with the cursor in (fn-with b) you can probably do SPC ; a( to achieve what you want