Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Prepare Rename Request #2894

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rogancodes
Copy link
Contributor

@rogancodes rogancodes commented Nov 21, 2024

Motivation

Closes #2854

Implementation

If the position of the prepareRename request corresponds to a node of type Prism::ConstantReadNode, Prism::ConstantPathNode, or Prism::ConstantPathTargetNode, the range of the node will be returned; otherwise, it will return nil.

Automated Tests

Added new tests

Manual Tests

Screencast.from.21-11-24.10.34.25.PM.IST.webm

@rogancodes rogancodes requested a review from a team as a code owner November 21, 2024 17:11
@andyw8
Copy link
Contributor

andyw8 commented Nov 21, 2024

Nice! Do you know if the "The element can't be renamed" message can be customized?

@rogancodes
Copy link
Contributor Author

To set a customized message, the error code and message need to be included in the response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide 'Rename Symbol' when not available
2 participants