How to get the resolved rename range, or should we drop range? #48700
Labels
api
editor-symbols
definitions, declarations, references
under-discussion
Issue is under discussion for relevance, priority, approach
verified
Verification succeeded
Milestone
Testing #48409
After resolving a rename location, there is no direct way to get the returned range. It's possible for extension author to save the range somewhere and retrieve it in
provideRenameEdits
, but this seems cumbersome.This API naming pattern is similar to
CompletionItemProvider
but work in the reverse way. Originally I thought it would resolve the range for the returned edit fromprovideRenameEdits
.I think an alternative might be
The range is not being used by VS Code anyway. Dropping it would make it clear it's the extension author's responsibility to provide range in
provideRenameEdits
. He can rundocument.getText(range)
to get the placeholder text.@mjbvz Also what's your thoughts since you are testing this too?
The text was updated successfully, but these errors were encountered: