     (define-key map "gD" 'ycmd-goto-declaration)
     (define-key map "gm" 'ycmd-goto-implementation)
     (define-key map "gp" 'ycmd-goto-imprecise)
+    (define-key map "gr" 'ycmd-goto-references)
     (define-key map "s" 'ycmd-toggle-force-semantic-completion)
     (define-key map "v" 'ycmd-show-debug-info)
     (define-key map "d" 'ycmd-show-documentation)

  (interactive "P")
  (ycmd--send-request
   (if arg "GetDocQuick" "GetDoc")
   (lambda (result)
     (-when-let (documentation (assoc-default 'detailed_info result))
       (with-help-window (get-buffer-create " *ycmd-documentation*")
         (with-current-buffer standard-output
           (insert documentation)))))))

(define-button-type 'ycmd--error-button
  'face '(error bold underline)

      (deferred:nextc it
        (lambda (result)
          (when result
            (if (and (not (vectorp result))
                     (assoc-default 'exception result))
                (ycmd--handle-exception result)
              (when success-handler
                (funcall success-handler result)))))))))
