Fork me on GitHub
#parinfer
<
2016-10-26
>
tianshu02:10:54

a VI in clojure?

eraserhd13:10:05

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

eraserhd13:10:04

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

snoe16:10:32

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...)

snoe16:10:02

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.

snoe16:10:04

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

eraserhd16:10:32

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

snoe17:10:59

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)

eraserhd17:10:47

@snoe What plugin did you write?

eraserhd17:10:30

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

eraserhd17:10:50

I shall install after lunch.

eraserhd18:10:15

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

snoe18:10:48

did you run :UpdateRemotePlugins and restart?

eraserhd18:10:09

no... that must be a neovim thing?

snoe18:10:37

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

eraserhd18:10:19

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

eraserhd18:10:39

I mean, support for it in NeoVim?

snoe18:10:47

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

snoe18:10:14

so you have node-host installed with pathogen too?

eraserhd18:10:50

Oh, I did not know about that.

eraserhd21:10:44

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?

snoe21:10:17

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.