Skip to content

Implement local rename within the current file #990

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

Merged
merged 4 commits into from
Dec 12, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Dec 7, 2023

A bit of refactoring and then implements rename within the current file by using the relatedidents request to get the locations to rename and find-syntactic-rename-ranges to get the ranges to rename.

rdar://117822427

@ahoppen ahoppen requested a review from bnbarham December 7, 2023 21:14
@ahoppen ahoppen requested a review from benlangmuir as a code owner December 7, 2023 21:14
@ahoppen
Copy link
Member Author

ahoppen commented Dec 7, 2023

swiftlang/swift#70287

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Dec 8, 2023

swiftlang/swift#70287

@swift-ci Please test

func 1️⃣foo(a: Int) {}
foo(a: 1)
""",
newName: "bar ( x : )",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer ignoring personally, any argument for keeping it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like, you would prefer to strip the parameter names? I feel like people should be allowed to misuse the rename tool for all the weird formatting styles they have.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, name in general. I think it would be more common for someone to accidentally have a space than to actually want it. But we can try it and see 🤷

@ahoppen ahoppen enabled auto-merge December 8, 2023 23:43
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Dec 9, 2023
@ahoppen
Copy link
Member Author

ahoppen commented Dec 9, 2023

@swift-ci Please test

ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Dec 9, 2023
@ahoppen
Copy link
Member Author

ahoppen commented Dec 9, 2023

@swift-ci Please test Windows

@ahoppen
Copy link
Member Author

ahoppen commented Dec 9, 2023

@swift-ci Please test

ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Dec 9, 2023
@ahoppen
Copy link
Member Author

ahoppen commented Dec 9, 2023

@swift-ci Please test Windows

2 similar comments
@ahoppen
Copy link
Member Author

ahoppen commented Dec 11, 2023

@swift-ci Please test Windows

@ahoppen
Copy link
Member Author

ahoppen commented Dec 12, 2023

@swift-ci Please test Windows

@ahoppen ahoppen merged commit ce9fdf9 into swiftlang:main Dec 12, 2023
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Dec 12, 2023
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Dec 12, 2023
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Dec 13, 2023
ahoppen added a commit to ahoppen/sourcekit-lsp that referenced this pull request Dec 13, 2023
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.

2 participants