Symbol Renaming (F2) does not work anymore when using VS Code Extension
Describe the Bug
When the VS Code extension (as of 0.17.0) is installed and enabled, the renaming of symbols with F2 in Python stopped working.
Might be related to #364
Example of code to reproduce:
number = 5
result1 = number + 10
result2 = number * 3
result3 = number ** 2
print("Addition:", result1)
print("Multiplication:", result2)
print("Square:", result3)
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
Hi @jfthuong thanks for reaching out. We don't yet support this feature but it's on our roadmap and we are tracking it here: https://github.com/facebook/pyrefly/issues/344. I'll make this a sub feature of that one.
This should be marked as a bug.
The issue is that when Pyrefly is enabled, the built in function for the "Rename Symbol" feature has been removed (or hidden?).
Before enabling the Pyrefly extension
Command palette:
The right-click menu:
After enabling the Pyrefly extension
The command palette:
The right-click menu:
The existing refactoring tools should not be affected by an extension being installed - especially one that is providing type-checking services.
Version info
VS Code
Version: 1.101.1
Commit: 18e3a1ec544e6907be1e944a94c496e302073435
Date: 2025-06-18T13:35:12.605Z (4 days ago)
Electron: 35.5.1
ElectronBuildId: 11727614
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Darwin arm64 23.6.0
Pyrefly
Identifier
meta.pyrefly
Version
0.20.2
Last Updated
2025-06-18, 09:26:34
I've filed a separate issue for this: https://github.com/facebook/pyrefly/issues/544
hi @sivynava, basic rename support was just added in 0.22.0, please try it out and let us know your thoughts!
Hi,
It seems there is still an issue when trying to rename: The element can't be renamed
I just tried to do a "rename symbol" today after re-enabling the Pyrefly extension and I could rename. Shortly after, I have done an update of VS Code (version 1.103.2) and it stopped working (FYI: I have Firefly 0.31.0)
Note that unlike before, we CAN see the Rename Symbol command
Disabling PyreFly allows to rename the variable correctly.
Anybody can reproduce?
Full VS Code version:
Version: 1.103.2 (system setup) Commit: 6f17636121051a53c88d3e605c491d22af2ba755 Date: 2025-08-20T16:45:34.255Z Electron: 37.2.3 ElectronBuildId: 12035395 Chromium: 138.0.7204.100 Node.js: 22.17.0 V8: 13.8.500258-electron.0 OS: Windows_NT x64 10.0.22631
... coming back on my comment, I just noticed that I had disabled Language Services for Pyrefly
After unchecking the box, it works
It's all good! 👍