Comments (4)
+1 for config
But, that's actually just a reason to drop a huge thank you @roman01la !
This is the first formatter I've found that actually worked on my system. <3 Thank you!
from zprint-clj.
Functionally, I'm hoping for four changes to zprint-clj:
- Read the file
~/.zprintrc
and callset-options!
with the result. - Get a string from the command line, call
cljs.reader\read-string
on it, and callset-options!
with the result. - Accept a file from
stdin
and write the result tostdout
. This makes it easy to use as a filter from any number of programs, including many editors (like the one I use). - Three (mutually exclusive) possibilities for
--hang
:- Remove
--hang
from the UI, and don't callset-options!
with the options map you are using now to remove all hangs. If people want to configurezprint-clj
without hangs, they can just configure the~/.zprintrc
file with{:style :no-hang}
, or put that options map on the command line. This would be my preference. It actually isn't the major UI change that it could be, since you don't document--hang
explicitly in the readme, you have to read the .js code to see it. - If someone specified
-i
or-o
, then call(set-options! {:style :no-hang}
, so they get the current behavior if they use the current command line switches, but if they usestdin
andstdout
, they get the normal defaults -- which they can change in~/.zprintrc
and on the command line. - Before doing anything else, call
(set-options! {:style :no-hang}
, which makes no hanging the default but allows people to override that.
- Remove
I would think that you could keep the current -i
and -o
user interface if you wanted to. Presumably you would use the file from -i
instead of stdin
and the file from -o
instead of stdout
if the switches were specified.
I was unable to hack something together quickly to do this in your existing .js main program, or I would have done so and sent it to you. The .cljs main program in @thheller package does much of what I've described in .cljs (without preserving your current command line switches, of course).
Thanks!
from zprint-clj.
@kkinnear Sorry I didn't respond earlier. I agree that configuration might be fine. Could you please list what exactly you think should be added/changed? I might take a look when I have time. Thanks!
from zprint-clj.
Resolved by #4
from zprint-clj.
Related Issues (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-clj.