Fork me on GitHub

Hello! I’m using Cursive for Fulcro, and I’m getting unexpected indentation behavior… when first argument is on a separate line, it’s fine. But when it’s on the same line, indentation is far more than expected. Any thoughts? (I was pairing with @tony.kay, and he was surprised as well — I’m assuming that this means he didn’t see this behavior on his system.). Thanks in advance!


You can "teach" cursive how to indent stuff. With the cursor on top of dom/div, open the "intention actions" context menu (Alt-Enter on linux, not sure on other OSs), select "Configure indentation for dom/div...", and pick "Indent".


Cursive should then remember how to indent that symbol, it's stored in the CodeStyle, I think. That said, sometimes I have to do that again after a while.


@U6VPZS1EK That’s the proper indentation. The rule is: All parameters to a function are aligned vertically. Since you put the first parameter on a new line, it gets the normal 2 space indentation, and all other parameters are alighted vertically beneath it.


You can override this behavior like polymeris says.


Awesome! Thank you, all!!!


in the Cursive settings Editor -> Code Style -> Clojure -> General you can set "Default To Only Indent". that IMHO is a better default and does what you wanted as a default, which you can still override for the exceptions if you want any.

💯 2

Oh, that’s lovely, @U05224H0W! Thank you! (And loving all you’re doing with shadow-cljs, too! 🙂

❤️ 5