code: def rename(self, new_name, range=None):
          
          self.log.debug('rename: in')
          if not new_name:
              new_name = self.editor.ask_input("Rename to:")
          self.editor.write(noautocmd=True)
          b, e = self.editor.word_under_cursor_pos()
          current_file = self.editor.path()
          self.editor.raw_message(current_file)
          self.send_refactor_request(
              "RefactorReq",
              {
                  "typehint": "RenameRefactorDesc",
                  "newName": new_name,
                  "start": self.get_position(b[0], b[1]),
                  "end": self.get_position(e[0], e[1]) + 1,
                  "file": current_file,
              },
              {"interactive": False}
          )
docs: Request a rename to the server.