How to compute the inverse of a WorkspaceEdit #28651
Unanswered
IndianBoy42
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
XY problem: I want to be able to undo a WorkspaceEdit (from a lsp rename, or code action). I'm thinking of hooking
vim.lsp.util.apply_workspace_edit
to compute the inverse (ie a WorkspaceEdit that does the opposite) and stash it somewhere so another keybinding can apply the undo by callingapply_workspace_edit
with the inverse. Does this make sense? is this something that maybe could live in core?The problem right now is
u
will only undo the current document.Beta Was this translation helpful? Give feedback.
All reactions