Fork me on GitHub
#parinfer
<
2016-08-15
>
holyjak08:08:47

I have another problem/question regarding parinfer in cursive - typing on a new line works, pasting not: START situation:

(do)
  |
When typing, to works:
(do
  xy|)
When pasting, it does not - the (xy) function call that I have pasted isn't put into the do block but ends up as a top-level statement:
(do)
(xy)|

cfleming10:08:23

@holyjak: Yes, that and the other issue you mentioned are the main two problems with parinfer in Cursive. The pasting issue you mention is IntelliJ trying to indent the code automatically after pasting. It’s generally what you want except in parinfer mode, I have to investigate if I can turn that off.

cfleming22:08:49

@sekao: I’m planning something more complicated. I’m planning to try for a hybrid mode, which auto indents like paren mode but takes semantics into account, and also fixes up parens like indent mode. I’m not sure it’ll work yet, but if it does I think it’ll be a good compromise. It will only work locally, i.e. it will only affect the largest surrounding matched pair, not the whole file, which will mean no longer needing to run paren mode over the whole file on open.