     (define-key map "v" 'ycmd-show-debug-info)
     (define-key map "d" 'ycmd-show-documentation)
     (define-key map "C" 'ycmd-clear-compilation-flag-cache)
+    (define-key map "O" 'ycmd-restart-semantic-server)
     (define-key map "t" 'ycmd-get-type)
     (define-key map "T" 'ycmd-get-parent)
     (define-key map "f" 'ycmd-fixit)

      ((or "ValueError" "RuntimeError")
       (ycmd--handle-error-exception .message)))))

(defun ycmd--send-request (type success-handler)
  "Send a request of TYPE to the `ycmd' server.

SUCCESS-HANDLER is called when for a successful response."
  (when ycmd-mode
    (if (ycmd-parsing-in-progress-p)
        (message "Can't send \"%s\" request while parsing is in progress!"
                 type)
      (let ((request-buffer (current-buffer))
            (request-point (point)))
        (deferred:$
          (ycmd--send-completer-command-request
           type request-buffer request-point)
          (deferred:nextc it
            (lambda (result)
              (when result

                      (ycmd--handle-exception result)
                      (run-hook-with-args
                       'ycmd-after-exception-hook
                       subcommand request-buffer request-point result))
                  (when success-handler
                    (funcall success-handler result)))))))))))

(defun ycmd--send-completer-command-request (subcommand &optional buffer pos)
  "Send completer SUBCOMMAND for BUFFER at POS."
  (let* ((buffer (or buffer (current-buffer)))
         (pos (or pos (point)))
         (subcommand (if (listp subcommand)
                         subcommand
                       (list subcommand)))
         (content (cons (append (list "command_arguments")
                                subcommand)
                        (ycmd--standard-content buffer pos))))
    (ycmd--request
     "/run_completer_command"
