parinfer

shaunlebron 2016-10-26T02:41:09.000051Z

@eraserhd: cool 😎

shaunlebron 2016-10-26T02:41:15.000052Z

link to avi?

tianshu 2016-10-26T02:56:54.000053Z

a VI in clojure?

👍 1
eraserhd 2016-10-26T13:19:04.000054Z

https://github.com/maitria/avi#avi

eraserhd 2016-10-26T13:21:05.000056Z

I'm wondering how much, if any, playing off Vims modality can hide parinfer's.

eraserhd 2016-10-26T13:22:04.000057Z

By the way, as someone learning formal logic and proof systems because I'm tired of broken, almost-working software, I'm really happy about parinfer's algorithm approach. // @shaunlebron

snoe 2016-10-26T16:37:32.000058Z

I'm not sure how well it would work since non-insert modes still change the buffer and need parinfer to run (pasting/search replace/indenting/etc...)

snoe 2016-10-26T16:39:02.000059Z

however, having i do vim-insert/parinfer-insert and some other binding put you into vim-insert/parinfer-paren might be interesting to try. basically splitting vim-insert into two.

snoe 2016-10-26T16:40:04.000060Z

in my plugin, I kept them separate so you have a vim mode and a parinfer mode and they don't meet.

eraserhd 2016-10-26T16:53:32.000061Z

@snoe I was thinking (hoping) that most vim users change indentation through < and > motions, so that insert mode is paren mode.

snoe 2016-10-26T17:04:59.000062Z

Yeah, that was a low hanging fruit (and my plugin could still be improved to work on the motion instead of just >> and <<), but you get situations like changing the name of a function that pushes the params to the right so you want to be in paren-mode but then you want to change a do to a let so you want to be in insert-mode and the vim-mode in which you make those changes shouldn't really matter (sometimes I use insert, sometimes ex, sometimes normal)

eraserhd 2016-10-26T17:17:47.000063Z

@snoe What plugin did you write?

eraserhd 2016-10-26T17:21:30.000066Z

Oh, that's sweet, as I'm using neovim now!

eraserhd 2016-10-26T17:21:50.000067Z

I shall install after lunch.

eraserhd 2016-10-26T18:04:15.000069Z

I removed vim-sexp* but kept vim-fireplace.

snoe 2016-10-26T18:07:48.000070Z

did you run :UpdateRemotePlugins and restart?

eraserhd 2016-10-26T18:08:09.000071Z

no... that must be a neovim thing?

snoe 2016-10-26T18:08:37.000072Z

ah yeah, it's a node-host plugin so the readme should walk you through it, unfortunately it's not plug and play

eraserhd 2016-10-26T18:11:19.000073Z

Hrmm... It creates an empty rplugin.vim which doesn't mention Node.js. Is Node.js new?

eraserhd 2016-10-26T18:11:39.000074Z

I mean, support for it in NeoVim?

snoe 2016-10-26T18:17:47.000075Z

it's the rplugin stuff, one of the core neovim goals to allow plugins written in other languages instead of the vimscript/pythonserver/language client dance that vim takes https://github.com/neovim/neovim/wiki/Plugin-UI-architecture

snoe 2016-10-26T18:18:14.000077Z

so you have node-host installed with pathogen too?

snoe 2016-10-26T18:18:46.000078Z

https://github.com/neovim/node-host#installation

eraserhd 2016-10-26T18:44:50.000080Z

Oh, I did not know about that.

eraserhd 2016-10-26T18:50:04.000081Z

It lives!

eraserhd 2016-10-26T21:14:44.000082Z

On occasion, nvim-parinfer.js changes my indentation when it's already well formed and I'm not in insert mode. Just now I entered a buffer and it dedented two lines by one space, from

(task main-marketing-content "57d02a49-5ad8-43aa-afaf-3800424d211f"
        "Create content")

      (task main-marketing-uat "57d02a49-1681-4d3e-a96c-fa1151e748f6"
        "UAT")
to
(task main-marketing-content "57d02a49-5ad8-43aa-afaf-3800424d211f"
       "Create content")

      (task main-marketing-uat "57d02a49-1681-4d3e-a96c-fa1151e748f6"
       "UAT")
. Why is that?

snoe 2016-10-26T21:29:17.000084Z

we need to run paren-mode on the file on bufenter to make sure everything is balanced (or else indent-mode can introduce errors), but IIRC that maintains whitespace unless there's a change - I could be wrong I haven't touched in awhile.