[ty] Add ty.experimental.rename setting#111
Merged
dhruvmanila merged 1 commit intomainfrom Aug 7, 2025
Merged
Conversation
MichaReiser
approved these changes
Aug 7, 2025
dhruvmanila
added a commit
to astral-sh/ruff
that referenced
this pull request
Aug 7, 2025
## Summary This PR is a follow-up from #19551 and adds a new `ty.experimental.rename` setting to conditionally register for the rename capability. The complementary PR in ty VS Code extension is astral-sh/ty-vscode#111. This is done using dynamic registration after the settings have been resolved. The experimental group is part of the global settings because they're applied for all workspaces that are managed by the client. ## Test Plan Add E2E tests. In VS Code, with the following setting: ```json { "ty.experimental.rename": "true", "python.languageServer": "None" } ``` I get the relevant log entry: ``` 2025-08-07 16:05:40.598709000 DEBUG client_response{id=3 method="client/registerCapability"}: Registered rename capability ``` And, I'm able to rename a symbol. Once I set it to `false`, then I can see this log entry: ``` 2025-08-07 16:08:39.027876000 DEBUG Rename capability is disabled in the client settings ``` And, I don't see the "Rename Symbol" open in the VS Code dropdown. https://github.com/user-attachments/assets/501659df-ba96-4252-bf51-6f22acb4920b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a complementary PR to astral-sh/ruff#19800 that adds the
ty.experimental.renamesetting in the extension.Test Plan
Refer to the test plan in the PR.