Code Refactoring actions not working

Describe the Bug

going threw the instructions on refactor python code:
Select the source code you’d like to extract and then select the light bulb in the gutter or press refactor to see available refactorings. Source code fragments can be extracted into a new method, or into a new function at various different scopes. During the extract refactoring, you are prompted to provide a meaningful name.

trying this but get: “No refactoring available”

Steps to Reproduce

  • mark the code
  • right click
  • click >> Refactor

Expected Behavior

give options for code refactor

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:53:59.659Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Additional Information

Python lang with the extension Python ext by anysphere

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

5 Likes

I have the same issue, but for me it is persistent, no matter what I do (nuke cursor and reinstalled, play with the extensions.. none), no one in my team could identify the issue, and it’s a problem with new cursor version.
It is related to the language server being set to None no matter what I do (and it might be related to the fact that Pylance extension is not discoverable in the extension panel)

i have the same problem brother… where is the support? ? ?

1 Like

hi @assaf-prime and welcome to Cursor Forum

Thank you for bringing that topic up, in the forum there are already threads on refactoring and its sometimes hard to find a duplicate due to many messages being posted.

Could you check if following is related to your issue?

hi,
its not related to this refactor. as I see it there are several issues with the language server since the anysphere ext change.
those server actions are very fundamental actions in python development.
actually, this is the first things that IDE should bring to the developer, before AI agent.
this thread is more about the “Extract Method” operation. (there are more actions that not exists here. but this is the most important)

1 Like

cc @ravirahman (he works on the extensions)

1 Like

Having the same issue.. is there and estimation for a fix?

1 Like

Hi all, thank you for this request. As of the moment, we do not support the refactor actions (other than rename) in our Python extension. As @condor suggested, could you create an issue in the DetachHead/basedpyright GitHub? Our extension is based on this, so we’ll port over any features/improvements they add.

1 Like