calva

2025-08-03T00:05:35.645279Z

I've been using Calva Format: Format and Align Current Form (recursively, experimental) lately and it has been working great. but is there a way for me to use the non-recursive one? sometimes I want to keep the maps nested inside to be as-is.

pez 2025-08-03T08:58:56.073519Z

I don’t even know what the “non-recursive one” means. 😃 As far as I know there are no options for it.

2025-08-03T09:05:00.524519Z

if i have to give my use case it would be like this map

{:pressed-key {:value "no key" :render (constantly false)}
 :frame {:value 0 :step 1 :min 0 :max 47}
 :flag1 true :flag false}
If I align this form, it would turn into
{:pressed-key {:value  "no key"
               :render (constantly false)}
 :frame       {:value 0
               :step  1
               :min   0
               :max   47}
 :flag1       true
 :flag        false}
and what I imagine as non-recursive alignment, it would make something like this
{:pressed-key {:value "no key" :render (constantly false)}
 :frame       {:value 0 :step 1 :min 0 :max 47}
 :flag1       true
 :flag        false}

pez 2025-08-03T10:17:56.125159Z

I think my confusion was from “the non-recursive one”, as if there was such a thing, which there isn’t. Check this note out https://calva.io/formatting/#about-aligning-associative-forms There is a link there to an issue on cljfmt which may shed some light on things.

2025-08-03T10:46:08.868129Z

ah, my bad as well. I keep forgotting that calva is consist of many components that I can check by myself. Thanks for the link, I will check them and get back if I have something that I can't solve by myself. and I did misunderstand that there is such a thing as "the non-recursive one". the command name includes the word "recursively, experimental" so I thought maybe there is also a way to do the opposite, but not readily available, given that it is still experimental.