ruff/crates
Dhruv Manilawala 7b6abfb030
[ty] Add ty.experimental.rename server setting (#19800)
## 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
2025-08-07 12:54:58 +00:00
..
ruff [flake8_import_conventions] Avoid false positives for NFKC-normalized __debug__ import aliases in ICN001 (#19411) 2025-08-06 06:42:51 +00:00
ruff_annotate_snippets [ty] Remap Jupyter notebook cell indices in ruff_db (#19698) 2025-08-05 14:10:35 -04:00
ruff_benchmark [ty] Remove special casing for tuple addition (#19636) 2025-07-30 16:25:42 +00:00
ruff_cache
ruff_db [ty] Avoid overcounting shared memory usage (#19773) 2025-08-06 15:32:02 -04:00
ruff_dev Auto-generate environment variable references for ty (#19205) 2025-07-08 10:48:31 -04:00
ruff_diagnostics [ty] Implement diagnostic caching (#19605) 2025-07-30 11:04:34 +01:00
ruff_formatter
ruff_graph [ty] Remove KnownModule::is_enum (#19681) 2025-08-01 10:31:12 +02:00
ruff_index Update Rust toolchain to 1.88 and MSRV to 1.86 (#19011) 2025-06-28 20:24:00 +02:00
ruff_linter [pylint] Mark PLC0207 fixes as unsafe when *args unpacking is present (#19679) 2025-08-06 14:19:49 -04:00
ruff_macros [ty] Support LSP client settings (#19614) 2025-08-06 18:37:21 +05:30
ruff_memory_usage [ty] Avoid overcounting shared memory usage (#19773) 2025-08-06 15:32:02 -04:00
ruff_notebook
ruff_options_metadata
ruff_python_ast [ty] Reduce size of member table (#19572) 2025-08-07 11:16:04 +02:00
ruff_python_ast_integration_tests Disallow implicit concatenation of t-strings and other string types (#19485) 2025-07-27 12:41:03 +00:00
ruff_python_codegen Disallow implicit concatenation of t-strings and other string types (#19485) 2025-07-27 12:41:03 +00:00
ruff_python_formatter Disallow implicit concatenation of t-strings and other string types (#19485) 2025-07-27 12:41:03 +00:00
ruff_python_index
ruff_python_literal
ruff_python_parser Disallow implicit concatenation of t-strings and other string types (#19485) 2025-07-27 12:41:03 +00:00
ruff_python_semantic [ty] Make Module a Salsa ingredient 2025-07-23 09:46:40 -04:00
ruff_python_stdlib
ruff_python_trivia
ruff_python_trivia_integration_tests
ruff_server [ty] Implement long-polling for workspace diagnsotics (#19670) 2025-08-04 10:26:38 +00:00
ruff_source_file [ty] Implement diagnostic caching (#19605) 2025-07-30 11:04:34 +01:00
ruff_text_size [ty] Add environment variable to dump Salsa memory usage stats (#18928) 2025-06-26 21:27:51 +00:00
ruff_wasm Allow hiding the diagnostic severity in ruff_db (#19644) 2025-08-05 09:56:18 -04:00
ruff_workspace [flake8_import_conventions] Avoid false positives for NFKC-normalized __debug__ import aliases in ICN001 (#19411) 2025-08-06 06:42:51 +00:00
ty [ty] Reduce size of member table (#19572) 2025-08-07 11:16:04 +02:00
ty_combine [ty] Support LSP client settings (#19614) 2025-08-06 18:37:21 +05:30
ty_ide [ty] Implemented support for "rename" language server feature (#19551) 2025-08-07 15:58:18 +05:30
ty_project [ty] Avoid overcounting shared memory usage (#19773) 2025-08-06 15:32:02 -04:00
ty_python_semantic [ty] Implemented support for "rename" language server feature (#19551) 2025-08-07 15:58:18 +05:30
ty_server [ty] Add ty.experimental.rename server setting (#19800) 2025-08-07 12:54:58 +00:00
ty_static [ty] Merge ty_macros into ruff_macros (#19229) 2025-07-09 11:28:21 +00:00
ty_test [ty] Add support for using the test command emitted when a mdtest fails (#19794) 2025-08-06 15:02:10 -07:00
ty_vendored [ty] Improve debuggability of protocol types (#19662) 2025-08-01 15:16:13 +01:00
ty_wasm [ty] Support stdlib files in playground (#19557) 2025-07-26 19:33:38 +01:00