Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Aug 7, 2025

Summary

This is a complementary PR to astral-sh/ruff#19800 that adds the ty.experimental.rename setting in the extension.

Test Plan

Refer to the test plan in the PR.

@dhruvmanila dhruvmanila merged commit e325761 into main Aug 7, 2025
1 check passed
@dhruvmanila dhruvmanila deleted the dhruv/experimental-rename branch August 7, 2025 12:52
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
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.

3 participants