Fork me on GitHub

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

When typing, to works:
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:


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


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