code: def add(self, extension):
          
          logger.debug('adding extension {}'.format(extension.name))
          self._extensions[extension.name] = extension
          extension.on_install(self.editor)
          return extension
docs: Add a extension to the editor.
  
          :param extension: The extension instance to add.