-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusion about rename support #255
Comments
I think so
It should be fixed, but we don't have the time to do it right now. So it should remain undocumented, I'd say.
If |
The only issue with it is that it doesn't work without a project and gives confusing log message in that case: sublimelsp/LSP-pylsp#86 |
I don't think it's possible to make it work in that case.
Could you try to improve it please? |
I believe the relevant code is in and the weird warning like:
comes from I believe that in this case "/Applications/Sublime Text.app/Contents/MacOS" refers to what it consider the project path which is the weird part. I understand that there is no workspace folder and thus a specific project path but it's weird that it then fallbacks to what seems to be a working directory. Not sure if that's something that jedi infers itself or if it's passed from pylsp. |
Hi, I am rope's maintainer. I'll try to see if I can fix rope_rename issue in the coming days. Currently, the built-in rope support in pylsp (i.e. With that said, another alternative could be to just move the What do you think, @ccordoba12? |
I think it'd be better to integrate everything rope related in pylsp-rope because it'd be easier to develop for you.
I think that's a great suggestion and I'm +1 to add it here. |
@lieryan any update on this? I ask as I notice |
@lieryan friendly ping. |
@doolio apologies for the delay in responding to your question. I'm copying my response from python-rope/pylsp-rope#14 where I had answered a similar question:
I don't currently use the rename feature from python-lsp-server (my current setup python-mode when doing renames, which internally uses rope) and since jedi_rename is the default anyway and seems to work fine for most people, this is personally not a high priority for me right now with my current capacity. But I'm happy to help if there's anyone interested to pick up the PR and champion it to move it forward. I don't fully recall the state of the PR when I left it, but IIRC, the PR probably already work in theory, but I don't recall if I ever tested it in an actual editor yet. And there might be some more work needed to be done for multi-file edits that involves renaming files. |
Thanks @lieryan. I don't use |
I think it'd be a good idea to remove the |
@ccordoba12 What about the |
Those need to stay here. |
This functionality is better served by the pylsp-rope plugin. Resolves: python-lsp#255
Hi all, rope rename support is now available on pylsp-rope since 0.1.16. Please read the pylsp-rope README on how to enable pylsp_rope.rename since the config option to enable pylsp-rope's rename is different than the builtin plugin and the functionality is disabled by default. I think there are two options to go forward from here.
Let me know if either of those sounds reasonable. |
That's really good news! Thanks for letting us know about it @lieryan.
I'd prefer to go with option 1. It's been customary for us to not give an option to install extras with third-party pylsp plugins. Could you take care of that? |
I can see some references to those:
jedi_rename
: https://cs.github.com/python-lsp/python-lsp-server?q=jedi_renamerope_rename
: https://cs.github.com/python-lsp/python-lsp-server?q=rope_renameBut none of them is documented.
When I try to rename in a simplest of projects, without setting any
jedi_rename
orrope_rename
options, it appears to work for me (but not for someone else, not sure why yet).With
"pylsp.plugins.rope_rename.enabled": true
it appears to work also but incorrectly (the file path is not specified so ST creates new buffer instead of modifying existing one). The log is:So in conclusion:
rope_rename
is not documented and also seems brokenjedi_rename
doesn't have an option and seems enabled by default - is that right?I guess my point is:
rope_rename
be documented, fixed or removed?The text was updated successfully, but these errors were encountered: