Fork me on GitHub
#cursive
<
2023-01-16
>
markbastian23:01:43

Is there a way to export or at least view the cursive formatting rules (e.g. to use with cljfmt)?

markbastian23:01:19

Actually, looks like it’s spelled out fairly plainly in Editor -> Code Style -> Clojure -> Form Parameters. What I’m really looking for is how to translate the UI dialog into something I can also use with external formatting tools like cljfmt. Like “Export to cljfmt.edn.”

cfleming09:01:17

Unfortunately the cljfmt model doesn’t map very well onto how Cursive formats things. I’m planning to try to improve this, and improve the interop between the two, but there isn’t a good way to do this except manually right now.

❤️ 4
mjhika13:01:08

that's good to know. Would love to see this come to fruition

markbastian15:01:00

Is one of the standard formatting tools (zprint, cljfmt (sounds like not), cljstyle) used under the hood or is it custom? Just curious. If I were trying to configure a pre-commit hook it would be nice to at least start with the same baseline formatter.

cfleming20:01:25

It’s custom, because it has to be built on the IntelliJ formatter. However, it’s very old code now and I’m planning to re-work it and try to make it more compatible with cljfmt.

👍 4
gratitude-thank-you 2