Skip to content

Error handling in Rename #566

@doriath

Description

@doriath

I have a question about properly handling errors in textDocument/rename. I wonder how server should respond to following scenarios:

  1. When textDocument or position in RenameParams in invalid (not existing file, position out of bound, etc.)
  2. When there is a compile error in the project, and we are unable to actually perform any renames
  3. When the position points to a symbol that can't be renamed (e.g. we point to an space character)
  4. What error code should be used if newName is invalid?

Also, the server returns result: WorkspaceEdit | null - what is the valid use of null? Is it when there is nothing to change, or for some of the cases above?

Would it be useful to clarify those in the actual specification, maybe giving some examples?

Metadata

Metadata

Assignees

No one assigned

    Labels

    clarificationhelp wantedIssues identified as good community contribution opportunitiesrename

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions