palantir / python-language-server

An implementation of the Language Server Protocol for Python
MIT License
2.6k stars 282 forks source link

Add support to rope refactoring functions #915

Open 00sapo opened 3 years ago

00sapo commented 3 years ago

A full list of functions available through rope is here: https://github.com/python-rope/rope/blob/master/docs/overview.rst#refactorings

An example to use it in a text editor is here: https://github.com/python-rope/ropevim

Having these features available would make pyls far better than others python language servers. Consider that the Jedi refactoring is much worst than the rope one.

mpanarin commented 3 years ago

How does it work with a bigger projects? For me a simple variable rename with rope in a project I work on (~1 mil loc) just hangs the server completely for more than a few minutes, which is fairly unacceptable

00sapo commented 3 years ago

I think that if it's the first time you use it in the project you have to wait until rope creates its cache. BTW I never work on so large projects... maybe it could be disabled when the project has more than N tags/symbols if it hangs

lieryan commented 1 year ago

pyls is no longer being maintained, you should switch to pylsp, which is a fork of this project maintained by the original author of pyls.

Once you install pylsp, you can install https://github.com/python-rope/pylsp-rope to get rope refactoring support.