Skip to content

Confusion about rename support #255

@rchl

Description

@rchl

I can see some references to those:

But none of them is documented.

When I try to rename in a simplest of projects, without setting any jedi_rename or rope_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:

:: --> LSP-pylsp textDocument/rename(6): {'position': {'character': 1, 'line': 0}, 'textDocument': {'uri': 'file:///Users/rafal/Downloads/tpy/test.py.py'}, 'workDoneToken': 'wd6', 'newName': 'xyx'}
:: <<< LSP-pylsp 6: {'documentChanges': [{'textDocument': {'uri': 'file:///test.py.py', 'version': None}, 'edits': [{'newText': "xyx = '111'\nyyy = xyx + '222'", 'range': {'end': {'character': 0, 'line': 2}, 'start': {'character': 0, 'line': 0}}}]}]}

So in conclusion:

  • rope_rename is not documented and also seems broken
  • jedi_rename doesn't have an option and seems enabled by default - is that right?

I guess my point is:

  • should rope_rename be documented, fixed or removed?
  • should there be some mention of rename functionality being supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions