atom-parinfer 1.22.0 has been published
smart-mode stability stuff for advanced operations requiring multiple changes
📰 Posted a general status update on parinfer: https://www.patreon.com/posts/16810914
(I'll let you know if I run into anything weird but it all sounds very promising from that blog post!)
@seancorfield thanks! i really appreciate your bug reports. super helpful
📣 Also, I created a *Parinfer forum* for easier discussions, since GitHub issues aren’t ideal and this chat disappears all the time: http://parinfer.trydiscourse.com/
@shaunlebron Run into my first "odd" behavior with the new parinfer. I have code like this
(cond (not member)
(api/invalid-argument req)
(or (:suspended member)
(:deleted member))
(api/invalid-argument req)
:else
(do
(timbre/logged-future
(business/login! req member)
(log/write-log :logxxx
{:siteid (or (get-in req [:params :xxxxxx])
(u/site-id member))
:userid (:id member)
:event "xxxxxx"}
req))
(resp/response {:code (xxx xxx)}))))
and I put my cursor just before the (do
and start pressing the space key. As the form moves to the right, the code inside the do
is indented by one more space than it needs to be each time.sweet
i’m not getting that behavior here, i wonder how we can tell what’s different
After four spaces, to line up (do
under the :else
, I have
(do
(timbre/logged-future
(business/login! req member)
(log/write-log :logxxx
{:siteid (or (get-in req [:params :xxxxxx])
(u/site-id member))
:userid (:id member)
:event "xxxxxx"}
req))
(resp/response {:code (xxx xxx)}))))
If I just use the auto-indent hot key, it moves over and is all indented correctly.
(that's lisp-paredit:indent
tho')
Interesting... Do you have lisp-paredit
as well?
yeah, i had installed just to try to repro your cases in #94
what OS?
Mac OS X
Well, macOS 🙂
Also, when I try to revert changes from SourceTree, Parinfer is fighting the editor and attempting to redo some of the changes. It took several goes at reverting changes to get back where I was originally.
interesting, so we need to turn off Parinfer when SourceTree is active?
oh, SourceTree is external to Atom
and Atom is loading in file changes as they appear in the filesystem, after which parinfer processes them as normal user changes
3:47 working on production deployment.😂
@shaunlebron Yeah, I suspect it's the multi-change code thinking the user is making a copy'n'paste and trying to deal with it? Whereas it's just Atom trying to load in file changes...
nevermind, just work late...
@shaunlebron I've also noticed that if I do some big multi-change (like the above indentation) and then hit cmd-z to undo, Parinfer seems to repeat the indent/undent operations that the editor is making as part of the undo, so some lines move further right (or left) than they should have done -- breaking the structure of the code.
I suspect that what is needed here, is if you can tell that the changes are editor-initiated, you need Parinfer to behave as if it is in Paren mode and never change code structure? Or just not attempt to process editor-initiated changes?
thanks, that’s helpful direction to think about
i just tried undo here after the indentation operation you described above
that still works as expected, so I think the larger problem of interference from another plugin is at play here
lemme know if you have a lead on what plugin might be, or if you just wanna send me a list of plugins you’re using with:
apm list --installed --bare
advanced-open-file@0.16.7
atom-clock@0.1.16
autocomplete-cfml@0.5.0
busy-signal@1.4.3
git-plus@7.10.0
highlight-selected@0.13.1
ink@0.8.2
intentions@1.1.5
language-cfml@0.17.1
linter@2.2.0
linter-joker@0.1.4
linter-ui-default@1.6.10
lisp-paredit@0.6.0
parinfer@1.22.0
proto-repl@1.4.22
proto-repl-charts@0.4.1
rainbow-delimiters@2.1.2
set-syntax@0.4.0
tool-bar@1.1.4
Happy to disable any you think might interfere in order to debug this.
yeah, that’ll be hard to know which
i can easily install these from command line to recreate the environment for debugging
tracking here: https://github.com/oakmac/atom-parinfer/issues/100