Calva gets Configurable Formatting

One of the first issues ever filed on Calva has finally been resolved. The formatter can now be configured to accommodate many indentation conventions. Any that cljfmt can, actually.

This has been a huge drawback for projects with a different standard than what Calva used. And it also made it difficult for teams to throw Calva into their mix of Clojure editors.

Now these projects and teams can configure their Clojure indents to their heart’s content. :smile: Tonsky Formatting should be a breeze to implement, for instance. See here how it works:

I want to publicly say a huge Thank You! to @nbardiuk for creating a well thought through imlementation of this. A reason it took so long to fix it, was that I didn’t really know what a good solution looked like. But now I know. Behold this awesomeness:

Isn’t it pretty cool that the config file itself is used to immediately see the result of the changes?

There has been more work done to Calva recently that improves it as a Clojure editor. I’ll get back with an update on that soon.

Happy Coding! :heart:

11 Likes

Wonderful!

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.