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

Formatting inside thread forms #223

Open
PEZ opened this issue Apr 13, 2021 · 1 comment
Open

Formatting inside thread forms #223

PEZ opened this issue Apr 13, 2021 · 1 comment

Comments

@PEZ
Copy link
Contributor

PEZ commented Apr 13, 2021

Hi, I want something like:

(cond-> foo
  :foo (as-> $
             bar))

to be formatted as if the threaded param was in place:

(cond-> foo
   :foo (as-> $
          bar))

In #45 we learn that cljfmt does not consider the outer forms when formatting a form. But there is also a suggestion to use a rule for -> like forms to deal with it. What would such a rule look like?

@weavejester
Copy link
Owner

weavejester commented Apr 13, 2021

I don't believe there's currently a way of doing this, unless you assume that as-> will always be part of an outer thread, or you just have a blanket "always indent by 2" rule for threading macros.

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

No branches or pull requests

2 participants