Fork me on GitHub
#parinfer
<
2018-11-23
>
chrisoakman04:11:07

"I don’t know how to make vscode defer rendering until the whole operation is done" --> this is the exact same problem I ran into here: https://github.com/shaunlebron/vscode-parinfer/pull/39

chrisoakman04:11:09

I think we need to reach out to the VSCode team for help with their API. They made an exception for the vim extension; I suspect we could get a similar arrangement.

pez06:11:06

I’m not where I have that problem yet. 😃 First I need to figure out how to use the parenMode and smartMode functions.

pez08:11:08

Found my error. :canges is plural.

pez10:11:12

The docs says: Process the text after a change OR a cursor movement. Might be because I have quite high fever today, but I don’t really understand why the text should be processed on cursor movement if it is processed on changes. Let me know, please, someone. Speak to me like I am five yo. 🙂

shaunlebron16:11:44

parinfer relaxes rules around the cursor, so it needs to know when its position changes

pez17:11:14

Hmmm. But we give it the previous and current position when we use it. And the functions are pure, right? I found that it will be a bit too much work for me right now to process text on changes, because vscode has limted API:s there, So I am rather considering to process text mainly on cursor movement, but I want to better understand what is going on, so that’s why I ask about it.

shaunlebron20:11:46

in that case it’s fine to skip the cursor event

shaunlebron20:11:25

same thing should happen after the next change event since you pass it the cursor everytime anyway, like you said 👍

metal 1
eraserhd23:11:11

So, in implementing parinfer-rust for Kakoune, one issue is that Kakoune natively relies on having multiple cursors (you can't search and replace without multiple cursors, for example). I'll need to add this to parinfer-rust, and I hope to also add it to parinfer just to keep them in sync as much as possible. Have any other editors needed or wanted this? Any pitfalls I should worry about?

eraserhd23:11:04

One problem is that cursors don't have unique identifiers, so matching previous cursor position to current cursor positions seems difficult. I know how to solve matching problems 😄 But I'll have to figure out what happens when a cursor disappears or appears.