python-rope / rope

a python refactoring library
GNU Lesser General Public License v3.0
1.88k stars 160 forks source link

Document editors, libraries, and LSP projects with rope support #364

Open lieryan opened 2 years ago

lieryan commented 2 years ago

Document all known first and third party projects that supports rope, how to use rope in those environments, and the state of their integrations. This should be linked in the README for visibility to users who stumbled into this project and wants to quickly know the best option they have to integrate rope to their development environment.

...

Subtasks:

lieryan commented 2 years ago

(draft)

There are currently three options for using rope in Vim:

There's also a potential forth option:

mcepl commented 2 years ago
* [rope-language-server](https://github.com/mcepl/rope-language-server) is a fork of Palantir's LSP by one of rope's own main maintainer. This project is not ready for prime time yet and is currently on hold.

And currently is dead. I can transfer it to the python-rope if you care about it, but I don't think it is worthy: it is not much more than a small fork of the original rather old commit of the Palantir Python LSP, with some non-rope functionality removed and replaced by rope, but really not that many. I think it would be nice if something like that was written, but I am not sure this is it.

And yes, I think that LSP is the future, and if rope wants to survive, it should be fully used by some LSP servers (“fully” meaning not just used for few refactoring functions before the LSP server gets better implementation, but used for everything rope is providing).

lieryan commented 2 years ago

After evaluating the landscape of LSP; currently, I think our best bet for moving into LSP space is by creating a python-lsp-server plug-in rather than forking python-language-server or python-lsp-server itself, the way that rope-language-server was doing. python-lsp-server has a plugin system that would allow 3rd party plugins to hook new functionalities into python-lsp-server.

python-lsp-server already has a first party rope plugin, but, as you said, it barely scratches the surface of rope's refactoring functionality. Currently, it only seem to provide renaming and completion.

We'll need it to implement more functionalities into it or create a third party rope plugin for python-lsp-server to make rope a more viable/competitive option there.

mcepl commented 2 years ago

Yes, but I was really thinking about more of rope even into the fundamental operations (go-to-definition), and ideally to make it so that the model of the document which is in memory IS the rope’s one. However, I won’t be writing this, so whatever whoever decides is their problem. rope-language-server is dead then.

lieryan commented 2 years ago

Personally, I'm happy to let users decide if they want to mix and match pylsp plugins. If they want to use Jedi for completion and definition jumping, but rope for refactoring, then they should be allowed to have that choice, rather than being forced to choose between jedi-only LS and rope-only LS.

Rope's core strength is refactoring operations, so that's where I want to focus my development effort, at least until we have a larger number of active contributors/maintainers to support the capacity to look after the other parts of Rope.

The way I see it, our real competition here isn't other open source tooling like Jedi or isort, even when there are definitely some (or a lot) of overlaps between these projects, but rather closed source language servers like Pylance or PyCharm.

mcepl commented 2 years ago

If pylsp allows this level of granularity, than good for us. Otherwise, all good points. And concerning the competitive scene, I would say https://github.com/Microsoft/python-language-server is somewhere on the top of the list.