This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-20
Channels
- # bangalore-clj (1)
- # beginners (145)
- # boot (8)
- # braid-chat (2)
- # capetown (2)
- # cider (27)
- # cljs-dev (232)
- # cljsrn (30)
- # clojure (223)
- # clojure-boston (1)
- # clojure-dusseldorf (2)
- # clojure-greece (1)
- # clojure-italy (21)
- # clojure-russia (16)
- # clojure-sanfrancisco (13)
- # clojure-spec (33)
- # clojure-uk (56)
- # clojurescript (165)
- # core-async (16)
- # core-logic (5)
- # cursive (14)
- # data-science (2)
- # datavis (2)
- # datomic (49)
- # duct (15)
- # editors (5)
- # emacs (6)
- # fulcro (11)
- # graphql (11)
- # hoplon (8)
- # jobs (4)
- # jobs-discuss (82)
- # jobs-rus (7)
- # leiningen (4)
- # luminus (5)
- # off-topic (90)
- # om (7)
- # om-next (1)
- # parinfer (67)
- # pedestal (34)
- # portkey (46)
- # re-frame (12)
- # reagent (4)
- # reitit (3)
- # remote-jobs (1)
- # ring-swagger (8)
- # shadow-cljs (13)
- # spacemacs (18)
- # specter (6)
- # sql (5)
- # tools-deps (4)
- # unrepl (40)
- # yada (26)
I still don't understand smart mode. It doesn't appear to do that. I might be sending in the previous cursor position wrong. Does it need changes to work?
Maybe I'm misunderstanding, the idea of smart mode is that you don't have paren/indent mode, you just make changes.
https://shaunlebron.github.io/parinfer/demo if you haven't tried it.
Only thing I can think of is to keep a copy of the buffer somewhere, and send on TextChanged send both to parinfer, and then replace the copy with the new text.
There's an event called InsertCharPre that works for a lot of typing, though it doesn't work for things like backspace. For those, I store the old position and text after updating them in TextChangedI.
I added code the FFI wrapper to compute the minimal change (assuming there's only one changed block).
Smart mode rocks! @shaunlebron
It might still die every so often, but I think at least it will tell us why now. Also, there are definitely rough edges.
Like, I think smart mode wants to know whenever the cursor moves. I'll have to figure out how to do that.
E216: No such event: TextChangedP <buffer> :call <SID>process(g:parinfer_mode,1)
E216: No such event: TextChangedP <buffer> :call <SID>process(g:parinfer_mode,1)
Looks like it's not nvim supporting anymore 😞Sorry, that's me being cautious against this not working in the future for neovim 😛
https://github.com/neovim/neovim/pull/7996 it's on the way
I wouldn't be against doing what fzf does: fetch them from the github releases using curl in response to a command
I noticed it will leave a trailing paren if the cursor is to the left of the indent when using >>
. That's something I'm going to try to fix eventually.
It's a shame that auto-indent doesn't work with parinfer either. I know we've covered this in the past.
You expect it to indent the :bar
line also, or you expect it to be indented inside the [
?
@eraserhd the :bar
being indent also is what I meant. But tabstops would be good too.
IIRC, it's custom >>
just used the parinfer tab stops (and also ignored count, unfortunately).
Parinfer exposes all the tabstops I'd guess, based on the visuals on the codemirror editor.
I did a quick google and didn't see that it existed. I suspect it will be a case of overriding >
and >>
I looked into that, and... I'm not really sure how to override >
. All the motions following happen in "operator pending" mode, so scripts can add new ones, but in my cursory search, it seems like I'd have to override each sequence individually.
I'm actually wondering if, now that I have smart mode, I'll not need to use >>
in the same way. Hmm.
er, I mean, I guess that's the motion, not the operator, even though it's called "operator pending"?