Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cljfmt] Format the project using Cljfmt #32

Closed
wants to merge 1 commit into from

Conversation

venantius
Copy link

This is purely a code formatting PR using the basic settings for Cljfmt (which I believe are set to be the defaults for Bozhidar's Clojure community style guide).

@greglook greglook self-assigned this Jun 29, 2016
@greglook
Copy link
Owner

greglook commented Jul 1, 2016

Try as I might I really don't like cljfmt's default style rules. I definitely see the value in having an automated formatter! I'll have to see how configurable cljfmt is and whether it can match my current style.

@venantius
Copy link
Author

It supports a fair amount of configuration, afaik. Let me know how you want to proceed.

@venantius
Copy link
Author

BTW I've made a ton of progress on ClojureScript support in the past two weeks; haven't uploaded everything yet but it's definitely happening :)

@greglook
Copy link
Owner

greglook commented Jul 2, 2016

It supports a fair amount of configuration, afaik.

I eventually settled on the following. Based on some experimentation it seems to preserve most of the syntax I want. I haven't checked to see if there's a way to exert finer control over blank lines, but those are rare enough errors that I'm not too worried about it.

{:remove-consecutive-blank-lines? false
 :indents {ns [[:block 1] [:inner 1]]
           defrecord ^:replace [[:block 1] [:inner 1]]
           with-options [[:inner 0]]
           #"[^\[{].*" [[:block 0]]}}

I added the above in 2c21185 and corrected the remaining issues (some of which were legit!) in ab20638.

BTW I've made a ton of progress on ClojureScript support

Awesome, glad to hear it!

@greglook greglook closed this Jul 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants