Implemented single character insertion and deletion#199
Implemented single character insertion and deletion#199
Conversation
gabritto
left a comment
There was a problem hiding this comment.
Code looks ok to me, but I left some suggestions for consideration. Excited to try this out!
| else if (serverCharacter > 0) { | ||
| // Delete previous character | ||
| documentVersion++; | ||
| await notify("textDocument/didChange", { |
There was a problem hiding this comment.
Maybe we should try to bit somewhat smarter about deletion in order to get closer to scenarios where someone is halfway through typing/editing code? e.g. delete the rest of the line, delete ending parentheses/braces, etc.
There was a problem hiding this comment.
Good idea! I'll add a case for deleting the rest of the line, and I'll increase the probability of deletion if the character is a brace/dot/similar punctuation
|
|
||
| // Single character mutations (insertion/deletion) | ||
| const mutationRoll = prng.random(); | ||
| if (mutationRoll < standardProb) { |
There was a problem hiding this comment.
Should we also try to undo all the changes we accumulated from time to time? I imagine we want to keep a balance between testing valid and invalid code.
No description provided.