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

Indenter and formatter do not agree on keyword in function position when regex indent rules are involved #2044

Closed
PEZ opened this issue Jan 28, 2023 · 1 comment

Comments

@PEZ
Copy link
Collaborator

PEZ commented Jan 28, 2023

Given a cljfmt config such as:

{:indents {#"\S+" [[:inner 0]]}
 :test-form
 (comment
   (and a
     b)
   (:require []
             [])
   :rcf)}

The formatter will indent things like in the :test-form there. But the indenter will indent the (:require ...) form using the [[:inner 0]] rule:

   (:require []|
             [])

enter

   (:require []
     |
             [])

tab

   (:require []
             |
             [])

I don't know if cljfmt is in the wrong here, so maybe we should ask/check over there before deciding how to deal with this.

cc: @SillyCoon (I tried the repro with v2.0.322 of Calva and it is the same there, so not an obvious regression from your recent work with this code.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant