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

Un-nest namespace functionality #335

Open
velios opened this issue Feb 11, 2024 · 1 comment
Open

Un-nest namespace functionality #335

velios opened this issue Feb 11, 2024 · 1 comment

Comments

@velios
Copy link

velios commented Feb 11, 2024

Tell me if you were ready to accept PR into the code base allowing formatting namespaces in the ways described in the article by Stuart Sierra how-to-ns?

I mean this part. Un-nest namespace feature

;; Good
(:require
 [com.example.client]
 [com.example.routes]
 [com.example.server])
;; Bad
(:require
 (com.example client server routes))

And also this horizontal space saving feature

;; Good
(:require
 [com.example.client]
 [com.example.routes]
 [com.example.server])
;; Bad
(:require [com.example.client]
          [com.example.routes]
          [com.example.server])

There are separate utilities like gfredericks/how-to-ns for performing this functionality, but it seems it would be appropriate to transfer this to your tool. If you are not interested for code like this in cljfmt codebase, then let me know and I won’t waste time preparing it. I'm not interested in doing this as a separate tool.

@weavejester
Copy link
Owner

That would be fine as two optional settings.

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