Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDiscards lexical , #67
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
arrdem
Mar 28, 2016
Contributor
This is due to the treatment of , as simple whitespace by rewrite-clj, currently being addressed over there in xsc/rewrite-clj#44
|
This is due to the treatment of |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
arrdem
Apr 3, 2016
Contributor
[rewrite-clj "0.5.0"] brings :comma nodes which makes this more tractable. https://github.com/xsc/rewrite-clj/releases/tag/clojars-0.5.0
|
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
MatthewDarling
Dec 21, 2017
Contributor
Looking at the linked examples, it looks like you want to keep commas when they're the first non-whitespace character on the line.
And anywhere else, removing them is fine?
|
Looking at the linked examples, it looks like you want to keep commas when they're the first non-whitespace character on the line. And anywhere else, removing them is fine? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
arrdem
Dec 22, 2017
Contributor
So I use ,, as a line prefix in require/import forms since none of the indenters happen to understand or format prefix lists meaningfully and that trick happens to work in CIDER. Same thing for cond and other forms which have consecutive pairs that are not typically block indented when on different lines.
In general, I'm not sure that cljfmt should be removing commas when they occur.
|
So I use In general, I'm not sure that cljfmt should be removing commas when they occur. |
arrdem commentedMar 18, 2016
It should be possible to use leading
,to force indentation. cljfmt currently strips leading , leading to unexpected changes in indentation.