Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unified change api for both modes #39

Closed
shaunlebron opened this issue Nov 12, 2015 · 1 comment
Closed

unified change api for both modes #39

shaunlebron opened this issue Nov 12, 2015 · 1 comment

Comments

@shaunlebron
Copy link
Collaborator

We can describe all text changes with this model: https://github.com/shaunlebron/parinfer/blob/master/test-cases/text-change.md

but right now, the parinfer api requires us to specify changes differently depending on the mode:

  • indent mode - line numbers to replace, new lines to insert
  • paren mode - specify a cursor-dx position indicating how far the cursor has moved

this requires a lot of manual work on the api user, so if we simply accept a change object described by the above link (which I think most editors expose on change events), we can offload this work to the modes themselves.

This should be done before #24 (creating the standalone parinfer-lib)

@shaunlebron
Copy link
Collaborator Author

since we're opting out of aggregating edits between debounces (see #75), we do not need this anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant