Skip to content

Let code actions highlight a range of code they apply to #199608

@mjbvz

Description

@mjbvz

Problem

For refactoring such as extract method or move to file, it's not always clear which code the action will apply to. This is especially true for languages like TS that try to intelligently expand the user's current selection

Proposal

Let code actions provide one (or potentially many) ranges that they will apply to. This range can then be highlighted as the user arrows through the code action list

For refactorings, this range would be the code in the current file that will be effected by the refactoring

For quick fixes, this range could be the range of the diagnostics that will be fixed (or we could just highlight the diagnostics directly since code actions already provide this info in CodeAction.diagnostics)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions