pylsp-rope icon indicating copy to clipboard operation
pylsp-rope copied to clipboard

pylsp-rope vs python-lsp-server[rope] ?

Open fdobad opened this issue 9 months ago • 1 comments

Hi, hope everyone in this community is alright!

Maybe a little dense here, but is there any difference between (pip install) pylsp-rope vs python-lsp-server[rope] ?

fdobad avatar Mar 14 '25 18:03 fdobad

Hi fdobad, yes they're separate plugins that implements different parts of rope into pylsp.

When you use the built-in pylsp plugin pip install python-lsp-server[rope] that enables autocomplete and autoimport functionality using rope. Note that jedi is the default auto complete provider in pylsp, the rope autocomplete provider usually needs to be enabled explicitly.

The plugin in this repo pip install pylsp-rope is an external plugin that implements the more advanced refactoring functionalities of rope, these are implemented as LSP code actions to extract, inline, organise import, rename symbols, etc.

The commonalities is that they both use rope internally, but otherwise there's currently no overlap in functionalities between what's implemented in built-in plugin and by this external plugin. There used to be a time when both the built-in and external plugin implements rename, but pylsp has removed their built-in rope-based rename implementation (their default rename provider is currently jedi).

You do not need to enable the built-in rope plugin to use the external rope plugin, and vice versa.

lieryan avatar Mar 14 '25 20:03 lieryan