def restore_editor(self, editor: Editor):
        editor.cursorPositionChanged.disconnect(editor.on_position_changed)
        editor.setFolding(QsciScintilla.PlainFoldStyle)
        editor.setEdgeMode(QsciScintilla.EdgeLine)
        editor.setEdgeColumn(80)
        editor.setMarginWidth(3, "")
        editor.setEdgeColor(QSettings().value("pythonConsole/edgeColorEditor",
                                              QColor("#efefef"), QColor))

        # Disable shortcuts
        for shortcut in editor.findChildren(QShortcut):
            shortcut.setEnabled(True)

        editor.markerDefine(
            QgsApplication.getThemePixmap(
                "console/iconSyntaxErrorConsole.svg"),
            editor.MARKER_NUM,
        )

        editor.setAnnotationDisplay(QsciScintilla.AnnotationBoxed)
        editor.setCallTipsStyle(QsciScintilla.CallTipsNoContext)
        editor.setAutoCompletionSource(QsciScintilla.AcsAll)

        editor.callTips.deleteLater()
        del editor.callTips
        editor.callTipsTimer.deleteLater()
        del editor.callTipsTimer
        editor.completer.deleteLater()
        del editor.completer
        del editor.project