Comments (4)
Neat idea. I just implemented it:
(czprint i252a {:parse-string? true :width 79})
(defn example
[vvvvvveeeeeeeerrrrrrryyyyy looooooooooooooooooonnnnggggg paraaaaaaams &
body]
(+ 1 2 3))
(czprint i252a {:parse-string? true :width 79 :vector {:no-wrap-after #{"&"}}})
(defn example
[vvvvvveeeeeeeerrrrrrryyyyy looooooooooooooooooonnnnggggg paraaaaaaams
& body]
(+ 1 2 3))
There is now {:vector {:no-wrap-after ...}}
, where the value of :no-wrap-after
is a set of strings. If one of these strings appears in a vector and it is near the end of a line, then if the next element doesn't also fit on the line, they both go on the next line.
Probably you can just configure {:vector {:no-wrap-after #{"&"}}}
globally, since other than in argument vectors, the chances of &
appearing by itself in a vector and being at the end of the line is low. And even if that happened, it would
just end up on the next line, which might not even be noticeable. Certainly one could just do this for defn
, but that seems like a bit more work than necessary to me.
Anyway, neat idea. The good news is it is coming. The bad news is that, having just released 1.2.4
, it will be a while
before I release 1.2.5
, which is where this will show up.
Thanks for the idea!
from zprint.
This is now implemented in 1.2.5
. Use :vector {:no-wrap-after #{"&"}}
to get the behavior you want!
from zprint.
hah No problems, I don't mind waiting. Thank you so much for your tireless work!
from zprint.
Excellent, thank you!
from zprint.
Related Issues (20)
- `;!zprint {:format :skip}` removes arglist when there's zero arg HOT 1
- 1.2.5 format changes: `dissoc` HOT 3
- Slowness when pairing smaller width with long strings HOT 4
- Search for .zprintrc in XDG_CONFIG_HOME HOT 1
- Request or help if exists already - `#js` reader syntax in cljs interop HOT 9
- how do I to check or write all files recurisvely in a folder? HOT 1
- Custom Syntax Formatting: Hiccup HOT 10
- "Smart" comment changes feedback HOT 15
- Parinfer compatability HOT 2
- Vertical alignment HOT 6
- Adding Better Clojure Formatting from Tonsky HOT 8
- Keep unchanged kondo directives HOT 3
- Consider segregating justification domains between blank lines
- Reflection and auto-box warnings - wrt GraalVM HOT 4
- Enforce a space between comment character and comment HOT 1
- Allow finer configuration of how certain Objects get printed HOT 3
- Sorting :require dependencies alphabetically. HOT 24
- Errors encountered when applying multiple styles may not be reported HOT 1
- Meta formatting HOT 4
- Making exceptions for `{:force-nl? true}` in maps when destructuring HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zprint.