Note that rust-analyzer returns custom "snippet" text edits. That means that one or more of the edits (in this case one) will include a snippet like $0 or ${0:foo}. I'm implementing opt-in support for that in LSP which this change depends on.
The point of the snippet is that the cursor position is moved together with moved function/item which otherwise would just stay in the old place.
Implement handling for custom request to move item up and down.
Tested with simple case like:
and moving
fn
s around.Note that rust-analyzer returns custom "snippet" text edits. That means that one or more of the edits (in this case one) will include a snippet like
$0
or${0:foo}
. I'm implementing opt-in support for that in LSP which this change depends on.The point of the snippet is that the cursor position is moved together with moved function/item which otherwise would just stay in the old place.
Based on rust-analyzer extension code:
Fixes #28