Skip to content

Warnings in WorkspaceEdit for rename conflicts #254517

Open
@ChayimFriedman2

Description

@ChayimFriedman2

rust-analyzer features a warning when a rename will cause conflict, that is will change the meaning of the program. However, the current UI is awful. I'd like to implement a better UI for this, but this needs support from VSCode. I imagine other language clients can also use this.

The UI I want is for rename that cause conflicts to show the rename preview, with conflicting variables highlighted in red, and with an option for the user to approve/cancel.

The way I imagine it will be implemented is by adding a new method to WorkspaceEdit, insertWarning(uri: Uri, range: Range, description: string, label: string, iconPath?: IconPath). The warnings will be grouped by label, similar to WorkspaceEditEntryMetadata.

I can implement this myself, but I wanted to hear if this will be accepted.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions