spacemacs

Black 2023-02-06T17:16:14.156589Z

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?

tomd 2023-02-06T17:22:07.308319Z

(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.

Black 2023-02-06T17:32:15.663849Z

evilnc-comment-operator I guess?

tomd 2023-02-06T17:32:48.719059Z

yeah, so I just checked, evil-nerd-commenter doesn't do "structural commenting"

tomd 2023-02-06T17:34:12.261649Z

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 🤔

tomd 2023-02-06T17:34:30.474669Z

If you have any thoughts, feel free to leave an issue on the evil-cleverparens github issue page

tomd 2023-02-06T17:37:31.034059Z

Right now, with the cursor in (fn-with b) you can probably do SPC ; a( to achieve what you want

👍 1
👍🏽 1