code: function setupGutterEventListeners(editor) {
          var cm = editor._codeMirror;
          $(editor.getRootElement()).addClass("folding-enabled");
          cm.setOption("foldGutter", {onGutterClick: onGutterClick});
  
          $(cm.getGutterElement()).on({
              mouseenter: function () {
                  if (prefs.getSetting("hideUntilMouseover")) {
                      foldGutter.updateInViewport(cm);
                  } else {
                      $(editor.getRootElement()).addClass("over-gutter");
                  }
              },
              mouseleave: function () {
                  if (prefs.getSetting("hideUntilMouseover")) {
                      clearGutter(editor);
                  } else {
                      $(editor.getRootElement()).removeClass("over-gutter");
                  }
              }
          });
      }
docs: Renders and sets up event listeners the code-folding gutter.
  @param {Editor} editor the editor on which to initialise the fold gutter