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

Calva formatting defaults do not get applied when including any kind of .cljfmt.edn config. #1228

Open
mchughs opened this issue Jul 8, 2021 · 1 comment · Fixed by #1229

Comments

@mchughs
Copy link
Contributor

mchughs commented Jul 8, 2021

The usage of a .cljfmt.edn configuration map overrides all formatting defaults Calva normally uses when there is no edn file.

For example, assuming you have you configuration path properly set, create a file .cljfmt.edn with the following content:

{:test {:a 1 :b 2}}

If you tab in here your formatter will apply and change the file to

{:test {:a 1
        :b 2}}

Calva, by default, uses :align-associative? as false. So, here we can see the defaulting has not been respected.

This also hints at a problem that the non-inclusion of a key-value pair in the map is actually read as truthy by the config-reader.

@PEZ
Copy link
Collaborator

PEZ commented Jul 8, 2021

Thanks! This certainly material for tripping up users!

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 a pull request may close this issue.

2 participants