codegrip icon indicating copy to clipboard operation
codegrip copied to clipboard

Reshape info cursor position

Open dgkf opened this issue 6 months ago • 0 comments

  • Actually exports reshape_info :facepalm:
  • Adds cursor information to the return value of reshape_info

The upcoming release of LSP will support SnippetEdits as returned WorkspaceEdits in a code action, which allows for setting the cursor position after reshaping so that it stays on the same syntax element after applying the reshape.

To allow this, I updated reshape_info so that it returns the character index where the cursor should be in the replacement text. This is determined by finding the same non-whitespace character index in the new text.

dgkf avatar Aug 30 '24 00:08 dgkf