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

feat: apply changes as text edits using LSP utils #18

Merged
merged 3 commits into from
Aug 31, 2023

Conversation

stevearc
Copy link
Owner

This means we can leverage all of the work that was done in the LSP client to preserve marks, cursor position, etc

This means we can leverage all of the work that was done in the LSP
client to preserve marks, cursor position, etc
Some LSP servers simply return a single TextEdit that replaces the whole
buffer. This is bad for extmarks, cursor, and if the buffer is open in
multiple windows the non-active window will jump to the top. We can
detect that situation and apply the same vim.diff logic to convert it
into more granular TextEdits.
@stevearc stevearc merged commit 92393f0 into master Aug 31, 2023
14 checks passed
@stevearc stevearc deleted the stevearc-text-edits branch August 31, 2023 01:34
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

Successfully merging this pull request may close these issues.

1 participant