mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 15:14:42 +00:00
![]() ## Summary This PR is a follow-up from https://github.com/astral-sh/ruff/pull/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 https://github.com/astral-sh/ty-vscode/pull/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 |
||
---|---|---|
.. | ||
src | ||
tests/e2e | ||
Cargo.toml |