Unity deprecated the old Visual Studio Code support package and created “universal” package for both VS and VSCode.
The problem is that the VSCode path is hardcoded into the package as can be seen here
Since the classes in that script are internal I don’t think there is a way to create a custom script that would recognize Cursor as an external code editor inside Unity.
I would overcome this issue by renaming the Cursor folder and exe to the VSCode after every update.
That was very tidious and annoying so I created a symbolic link for the cursor folder and cursor.exe acting like VSCode and it works perfectly.
I propose either reaching out to Unity for adding support for Cursor or adding a button on setup similar to the “code” command where it would create symbolic links if VSCode isn’t installed.