This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-22
Channels
- # admin-announcements (7)
- # beginners (56)
- # boot (69)
- # cider (168)
- # cljs-dev (2)
- # clojure (170)
- # clojure-austin (25)
- # clojure-beijing (3)
- # clojure-belgium (2)
- # clojure-france (3)
- # clojure-poland (17)
- # clojure-russia (115)
- # clojure-uk (40)
- # clojurebridge (3)
- # clojurescript (87)
- # cursive (9)
- # datomic (30)
- # dirac (18)
- # editors (3)
- # emacs (14)
- # hoplon (195)
- # immutant (14)
- # jobs (3)
- # jobs-discuss (4)
- # leiningen (11)
- # melbourne (5)
- # mount (42)
- # off-topic (5)
- # om (24)
- # onyx (48)
- # parinfer (53)
- # proton (1)
- # protorepl (2)
- # re-frame (3)
- # reactive (2)
- # reagent (29)
- # rum (5)
- # spacemacs (4)
- # untangled (91)
- # yada (1)
A cursive user discovered a major bug in Parinfer that is now fixed in 1.8.1
@shaunlebron: Thanks for the quick fix!
thanks for reporting!
I was planning to try to modify the integration so that it would only run the initial paren mode on first modification rather than file opening, but I can’t figure out a way to do that.
yeah, that seems tricky 😕
Yeah - I can hook into the action system and do it before any action, but actions are everything from editor actions to moving to another editor.
So it would always trigger - there’s no way to detect an action that will modify the doc. And once the doc is being modified it’s too late.
I don’t think that spacex video is any consolation here
It’s been a bad problem because I have a “toggle structural editing style” action which cycles through none, parinfer, paredit. That previously would modify the doc while passing through parinfer mode.
(it was even worse because of a bug that wouldn’t run paren mode when it should, so it would actually break code).
I would remove it from the toggle cycle
It’s now configurable - users can select which modes they want to appear in the toggle.
interesting
what is the default toggle cycle then
and would a localized (non-global) paren mode help here?
I’m still thinking about options for a local hybrid mode. I’m using parinfer myself at the moment, and there’s a lot I like about it that I’ll have to try to replicate in whatever I come up with.
In particular, I often leave dangling parens at the end of test forms so that I can easily add a new case just by duplicating the line. Using parinfer I can just duplicate the line anyway and it all gets tidied up.
can you undo the paren mode changes if you can detect that the user toggled through parinfer without any manual modifications?
I considered doing the action system hook and whitelisting some actions that a user would typically use to navigate between files, but that’s fragile.
(I even considered analysing the bytecode of all actions in the platform to see which ones definitely don’t modify the document, but that’s probably crazy).
java bytecode?
yeah definitely crazy
I just don’t have enough context on this to comment one way or the other
is there something else I can help with? I’ve been refocusing on cljs api docs in secret
No, thanks - I’m just patching bugs for the moment. Once I have a hybrid mode to test I’d love some feedback.
Doing the real-time indentation is tricky to make performant, so not sure when I’ll get that going.
i’ve been in Atom for the past couple weeks trying out Parinfer
I’ll switch to cursive for the next couple weeks to get more familiar with it. will let you know how it goes, and happy to give feedback on others things as they come
real-time indentation?
Ok, thanks. I’m going to push a release probably Monday fixing some pretty bad bugs, and I’ll get that 1.8.1 fix in there too.
I mean, doing something like paren mode which maintains indentation, but having it be aware of semantics, i.e. how different forms need to be indented.
ah, yes. that stuff needs to be synchronous if you do it with paren mode. i see what you mean now
i have to jet, getting late
catch up soon