Fork me on GitHub
#emacs
<
2023-05-05
>
Casey15:05:11

Lispy/Lispyville question, which command is it to perform the following edit?

;;; Starting with point at |
[:ul
 (|if (seq travel-discounts)
     (map (fn [{:travel.discount/keys [discount-name]}]
            [:li  discount-name])
          travel-discounts)
     "None")]

;; End result
(if (seq travel-discounts)
  [:ul
   (map (fn [{:travel.discount/keys [discount-name]}]
          [:li  discount-name])
        travel-discounts)]
  "None")
sort of like lispyville-raise-list but keeping the parent form

tomd15:05:31

I think you're looking for lispy-convolute, but your cursor would need to be before/on the (map...

ag20:05:23

btw. Smartparens also has convolute (you don't have to use Lispy if you don't want to).

Benjamin14:06:24

yes convolute . Your starting position would be more powerful if it was outside a paren I feel like.