-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Closed
Closed
Copy link
Labels
api-proposalverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded
Milestone
Description
Problem
Extensions that use CodeActionProvider to return refactorings almost always want to compute refactorings based on the current selection. The range current passed to a CodeActionProvider may be the selection or it may be the range of a diagnostic within the current document.
As a workaround, extensions have to try getting the selection from activeTextEditor
Proposal
Add a selection property to CodeActionContext. This optional property would have the current selection in the document.
Alternative designs
- Introduce a
CodeActionProvider2that has more deterministic behavior forrange. - When registering a
CodeActionProvider, allow extensions to request thatrangeshould always be the current selection
/cc @kieferrm
Reactions are currently unavailable
Metadata
Metadata
Labels
api-proposalverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeeded