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

Mention alternative argument align options #153

Closed
wants to merge 1 commit into from

Conversation

Deraen
Copy link

@Deraen Deraen commented Oct 16, 2017

Here is finally a proposal to fix #126, adding mention about the alternative way to align function arguments.

I added one example mentioned on the discussion, not sure if that is useful.

@dijonkitchen
Copy link
Contributor

Seems like this can be merged since it's mentioning the option and is how cljfmt formats too.

@bbatsov
Copy link
Owner

bbatsov commented Apr 29, 2019

I'm fine with the suggestion, I just want to avoid mentioning specific tools in the guide, as their configurations are not set in stone. We should use some neutral language here.

@bbatsov
Copy link
Owner

bbatsov commented Apr 29, 2019

Btw, cljfmt uses 1-space indents by default (as currently suggested in the guide).

@bbatsov
Copy link
Owner

bbatsov commented Dec 12, 2020

I've added a sidebar about this in this section https://guide.clojure.style/#one-space-indent I'll see how I can add some anchor directly to it.

@bbatsov bbatsov closed this Dec 12, 2020
@Deraen
Copy link
Author

Deraen commented Dec 13, 2020

Cool!

I think this is good explanation of the alternatives.

Note about list literals, Vim has a special case for lists starting with a number, items are intended with single space. But the problem does indeed appear with other lists, even after quote or syntax-quote, which makes sense, as quoted list could also be code. Probably no reason to mention this, though I wonder if the example can confuse someone, as Vim doesn't indent the examples like that.

@bbatsov
Copy link
Owner

bbatsov commented Dec 14, 2020

Thanks for the feedback! I'll polish the wording later.

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.

Single-space indentation when no arguments on same line as function name
3 participants