Fork me on GitHub
#parinfer2015-11-24
>
shaunlebron20:11:14

thanks for creating this!

shaunlebron20:11:22

if anyone wants to help add parinfer to editors/repls, wrote a guide here on how to do it: https://github.com/shaunlebron/parinfer/tree/master/lib

shaunlebron20:11:52

I’ll subscribe to notifications here so I can answer questions

dominicm20:11:39

Hello shaun simple_smile

chrisoakman20:11:15

I can help answer questions about editor integration

shaunlebron21:11:58

didn’t understand what you said here: https://twitter.com/severeoverfl0w/status/669238565545615360 might be able to help with more details

dominicm21:11:56

@shaunlebron Neovim's built-in autoindent isn't running, when the parens are closed, because, well for most people that's what is desired!

dominicm21:11:46

But, if parinfer has an override, I just need to double check that nvim-parinfer.js is supposed to be shifting the cursor in accordance with parinfer, (as opposed to it being a parinfer issue)

dominicm21:11:02

Does that make any sense?

mfikes21:11:56

Hi Chris, Shaun :)

shaunlebron21:11:15

yeah, dominic, it’s still a little vague

shaunlebron21:11:20

are we talking about Indent Mode?

shaunlebron21:11:04

if you could create a concrete case for what you’re expecting (current text -> keystroke -> expected output), I can better understand

dominicm21:11:31

@shaunlebron: I'll give it a go.

dominicm21:11:41

@snoe do you know what I'm talking about by any chance?

shaunlebron21:11:11

“when the parens are closed”, they are always closed in Indent Mode, right?

dominicm21:11:24

@shaunlebron: I'm not sure nvim-parinfer.js supports anything outside indent mode anyway.

dominicm21:11:00

Tell you what, @shaunlebron I'll try the replete example in neovim.

shaunlebron21:11:07

yeah, replete’s example would not produce the same behavior in Indent Mode

shaunlebron21:11:51

but if the editor has correct auto-indent, the cursor should be at the correct position, but the close-parens will stay on the previous line

shaunlebron21:11:05

(when pressing enter I mean)

dominicm21:11:12

Replete's example does work.

shaunlebron21:11:38

it’s the difference between [pressing enter in indent mode](http://shaunlebron.github.io/parinfer/#pressing-enter) and [the new paren mode cursor feature](http://shaunlebron.github.io/parinfer/#knowing-when-parens-move-in-paren-mode)

dominicm21:11:34

Ah, so what I'm trying to get is similar to vim's built in auto-indent, where it will match the indentation of the previous block of lisp.

dominicm21:11:45

Sorry about the confusion here 😛

dominicm21:11:05

vim isn't matching it though, because the parens aren't closed (it would if they were open).

shaunlebron21:11:36

yeah, I think you’re talking about cursor position

shaunlebron21:11:00

I would try it myself in neovim, but I somehow crashed my neovim

dominicm21:11:14

Yeah, cursor position, but from opening a new line underneath a closed block of lisp.

shaunlebron21:11:49

I have to head out right now, but I’ll read this later

dominicm21:11:18

In my head, it was supposed to move the cursor to match the previous indentation when doing that. No idea if this fits with parinfers development goals or not

snoe22:11:22

@dominicm: If you insert a newline at the end of the form auto-indent puts you in the right place, but usually you just go to the end of a top level form, which puts you on a new top level indent. (basically I've had to get use to counting closing parens so i can insert in the right place.... It's slightly annoying)

dominicm22:11:58

@snoe I'm in the habit of just hitting "o" beneath a top level form, and expecting to be whoosed to the previous indentation. I'm currently just hitting space & typing until I get it right (or using % on the opening bracket)

snoe22:11:40

yeah i've had to stop doing that 😕

dominicm22:11:57

Maybe it'll become a parinfer feature, who knows! simple_smile