cljfmt icon indicating copy to clipboard operation
cljfmt copied to clipboard

Format ns-qualified maps?

Open vemv opened this issue 6 years ago • 2 comments

Hi there,

cljfmt doesn't appear to format ns-qualified maps:

cljfmt.test-util.common=> (reformat-string "#:foo.bar  {:owner-type 1}" {})
"#:foo.bar  {:owner-type 1}"
cljfmt.test-util.common=> (reformat-string "#:foo.bar {:owner-type 1}" {})
"#:foo.bar {:owner-type 1}"
cljfmt.test-util.common=> (reformat-string "#:foo.bar{:owner-type 1}" {})
"#:foo.bar{:owner-type 1}"

...this has the specific impact (at least as my coworker reports) that Cursive's Parinfer can stop working properly if there's any whitepsace between the qualifer and the map.

Is this something you have tried working on at some point? (Asking because it might be hard to fix)

Thanks - V

vemv avatar Sep 23 '19 21:09 vemv

If someone wants to send me a PR to add a feature then I'll certainly review and (eventually!) merge it in. But I have to many other projects to devote much time to cljfmt myself.

weavejester avatar Sep 23 '19 22:09 weavejester

@vemv, I think I might have started on this a long while ago but abandoned my effort. I can take up the cause again if/after we upgrade to rewrite-clj v1.

lread avatar Mar 15 '21 23:03 lread