I made a major change to Parinfer last year and called it v2
the change was related to how to handle an unmatched close-paren
Chris thinks it was a mistake, and we’re having a minor debate about it here: https://github.com/oakmac/atom-parinfer/issues/76
i’d like to hear your opinion though @cfleming @sekao @bhurlow @doglooksgood (or others)
for now, leaving imbalanced state. I have to type close parens manually. before V2, I do the same. is there I missed something?
I agree with Chris, the expected behavior is for auto-balancing
maybe that's not something parinfer should be doing, maybe you should complement parinfer with an auto-close plugin
I mean, I use it in Emacs alongside smartparens in strict-mode and paredit
and anymore whenever I'm not in that environment something feels off
thanks guys, i’ll work on an implementation so we can see how it feels
@doglooksgood you have to type close-parens manually for both v1 and v2 in the case described. the new rules may prevent that
wrote up a summary of the new proposal: https://github.com/shaunlebron/parinfer/issues/131
also, going to build a formatter to help use parinfer on teams: https://github.com/shaunlebron/parinfer/issues/132
Definitely make it a node script. Everyone has it now, and it's fast enough™
well, except in large projects I guess. In which case java is probably better.
@dominicm will do
I have noticed that zprint is quite slow against whole files from lumo. So maybe I should take back that idea 😛
prettier runs pretty fast, I’ll be looking how they do it
zprint?
prettier is based on a paper: http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf no idea if the speed comes from this
oh, i thought we were talking about node’s i/o
parinfer on node is lightning fast though
15ms per 3k lines?
can’t remember, but it’s fine
zprint is clojurescript (on lumo). So that might be it. But it was definitely a big pause for a single file. Like ~30s or so.
oh wow, I didn’t know about this, only heard of cljfmt
I've no idea why nvim parinfer doesn't feel fast on my machine then, it's a new laptop. Maybe something misconfigured, or it's using the clojure one still
maybe my benchmarks are off, atom-parinfer always felt fast to me, but it does limit itself to the parent expression
ah, I'm not sure if nvim parinfer does that 🙂
we’ll see, I’ll tag you for feedback when it’s ready
I've got some large real world projects which will enjoy some benchmarking
any ideas for the name of the cli command? @dominicm
Hmm. Something inside me feels cheesy, but parinfmt doesn't sound terrible.
lol
I’d probably settle for parinfer-fmt if we’re going that direction
or parinfer-prettify or just parinfer