This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-14
Channels
- # admin-announcements (5)
- # aws (3)
- # beginners (35)
- # boot (96)
- # cider (1)
- # clara (6)
- # cljs-dev (12)
- # cljsrn (34)
- # clojure (151)
- # clojure-boston (3)
- # clojure-brasil (4)
- # clojure-canada (1)
- # clojure-czech (8)
- # clojure-dusseldorf (11)
- # clojure-japan (5)
- # clojure-russia (120)
- # clojure-taiwan (1)
- # clojure-uk (3)
- # clojurescript (7)
- # component (27)
- # cursive (13)
- # data-science (45)
- # datomic (1)
- # devcards (5)
- # emacs (3)
- # funcool (65)
- # hoplon (103)
- # instaparse (3)
- # jobs (14)
- # jobs-discuss (1)
- # juxt (2)
- # lein-figwheel (2)
- # off-topic (16)
- # om (20)
- # onyx (49)
- # parinfer (17)
- # perun (1)
- # planck (5)
- # proton (4)
- # re-frame (14)
- # ring-swagger (4)
- # spacemacs (4)
- # untangled (110)
- # yada (14)
my new strategy for cut/paste events is to run paren mode and then indent mode. that way, it will first correct indentation if possible, then it will fix unbalanced delimiters
previously i was running indent mode alone, which was messing up since pasting a multi-line form in a REPL (or sometimes in the editor) caused it to mess up the form because the prompt caused the first line to separate from the rest of the form
the fix is in the latest nightcode and paren-soup, seems to work well so far but there may be things i overlooekd
@avi yeah ill pair with you for a session or two 🙂
im in seattle for clojurewest too
@sekao cool. paren mode will only work if parens are already balanced actually. mfikes sort of modified it work without being fully balanced for the purpose of autoindent in planck
i'll look into adding that as an option since this is a good strategy for copy paste
Yeah, I guess I used indent mode followed by paren mode https://github.com/mfikes/planck/blob/master/planck-cljs/src/planck/repl.cljs#L38
ah thats not what we want then
i think i can make it emit a partial result
@shaunlebron: yeah i knew it only worked with balanced parens. the logic i wanted was essentially “fix indentation if the parens are balanced; otherwise, balance the parens"
ah i see. sorry i misread your first message
yeah that seems like a good strategy. will try it out
@sekao you attending clojurewest?
@shaunlebron: sadly no =\ my fellow charlestonian ghadi will be speaking there so i was tempted but couldn’t justify the travel expense. i’m determined to make it to the conj this year though
@sekao that sounds like the hybrid mode that I put into nvim https://github.com/snoe/nvim-parinfer.js/blob/master/src/nvim_parinfer/main.cljs#L28-L32 sadly, it then requires slurp and barf from paredit to be usable.