just finished my second week working on something for the new page that just didn’t work out
i setup codemirror to transition the characters that were being shifted by parinfer, as a means to better illustrate the new things, but seeing it actually moving around is more noisy than it is clarifying, which is a bummer
interestingly, I think the indent guides (vertical bars below open-parens of multi-line expressions) just better illustrate what is happening without adding noise
i’m gonna gather my thoughts on it this weekend as we flee the hurricane!
also, my conj talk on all this stuff was accepted, so I’ll be preparing material for that
@shaunlebron Congrats!
I have v3 working in Cursive with the indentation problem marking, but I’m just working through a couple of bugs before a test release.
Once that is fixed I’ll add the top-level-form improvement. I already have the code written to return the information, I just need to allow running parinfer over a partial section of a file.
@cfleming: I’m returning a parens
tree which can be used to find top-level expressions
Right, I’m actually not returning that in my version - I could have used that.
I trimmed out most of the things I’m not using to make porting faster, I’ll add them back in when I update the official parinfer-kt
At the time I didn’t think I’d be doing the top level form thing.
makes sense!
But it’s also trivial to return that info from onOpenParen and onBalancedCloseParen, and as a bonus I can record while scanning which of them are balanced.
yeah, they’re also helpful for drawing indent guides correctly
Right, IntelliJ actually draws those automatically anyway.
They’re really nice for Clojure.
I actually published 3.11.0 tonight with some parens
tree fixes since I noticed some problems when testing them in CodeMirror before adding them to Atom
(testing indent guides I mean)
Ok, I’ll check out those changes.
I have one last bug to squash, but I think it’s a bug in my integration, not in parinfer itself.
But I think the integration in Cursive is really nice now, it’s a huge improvement.
I need to work on cut and paste, which has always been a problem.
IntelliJ tries to be smart about indenting pasted code, and it interacts badly with parinfer.
Looks nice!
it’s on now in the demo editor: http://shaunlebron.github.io/parinfer/demo
BTW what do you use to record gifs?
thanks! i think i’m convinced that tab stops are crucial for understanding what parinfer is doing now
oh, i’ve been recording screencasts with ScreenFlow on mac for a while
And that converts to gif?
yeah, it exports
I used to just use quicktime video recorder and upload to gfycat
Cool, I’ll check it out.
I’m pretty convinced that marking the incorrect indentation and letting the user fix it is the right approach, BTW. I’ll be interested to see what you think when I have it ready to try.
i’m pretty excited about it too, looking forward to digging into it
When I record the incorrect indentation, I also know what paren mode would correct it to, so hopefully I can show that somehow (perhaps a light green marker up to the right point then a red one after that or something)
To guide the user to do the right thing.
yeah, interesting
does cursive add indent guides under maps and vectors?
oh, and if you’re using forceBalance
off in cursive, you’ll want to pull in the 3.11.0 change which fixes an annoying problem I’ve been seeing in atom
(i.e. unmatched close-parens are now removed when in a leading paren trail, if that makes sense)
I’m up too late, catch up soon!
Ok, I’ll check it out, thanks!
@seancorfield Hopefully Parinfer v3 should mean that you won't have to switch modes anymore. If you have the latest Parinfer in Atom, maybe turning on "Smart Mode" in the package settings can fix some of your issues? My understanding is that the Atom Parinfer plugin will be switched over to v3 "Smart Mode" by default once the kinks are worked out.
Ah, I'd shied away from that because it was marked "Experimental" but I'll give it a go today -- thanks @rgdelato !
@ashnur I just fixed the other clojure plugin that's designed the same way. Steps I took:
rm -rf ~/.config/nvim/plugged/node-host
Then this is my plugin config:
Plug 'neovim/node-host', {'commit': 'c1c4872a6a6837f333d8470185e0ea0f10256e3c', 'do': 'npm install'}
Plug 'clojure-vim/clj-refactor.nvim', {'do': ':UpdateRemotePlugins'}
Then I did
:PlugInstall
:UpdateRemotePlugins
:q
and now the stuff is working again.Looks like node-client made some major api changes, that forces a dependency on babel now.
This seems to "mostly" work but has broken my code once (doing an operation that work not break in Indent mode) and it sometimes produces really funky indentation so I think I'm going to turn it back off for now @rgdelato
Okay, fair enough. If you have the time, please report your issues on the repo! https://github.com/shaunlebron/parinfer/ Shaun is currently busy making a new website and preparing a Conj talk for Parinfer, so it won't be fixed immediately, but having these issues documented is really important
Aye, if I can reproduce the weirdness I saw, I will definitely let Shaun know.
This particular issue seemed to be an interaction between Parinfer's "smart mode" and Paredit's attempt to indent code after a slurp operation wrapped across multiple lines.