 ;;
 ;; Basic usage:
 ;;
-;; To start a ycmd server, use 'ycmd-open. The argument to ycmd-open
-;; is a project-specific configuration file which gets loaded with
-;; 'ycmd-load-conf-file (which you can call explicitly if you want as
-;; well.) Then you can use 'ycmd-get-completions to get completions at
-;; some point in a file. For example:
-;;
-;;   (ycmd-open "/full/path/to/some/.ycm_extra_conf.py")
+;; First you'll want to configure a few things. If you've got a global ycmd config file, you can specify that with
+;; ycmd-global-config:
+;;
+;;   (set-variable 'ycmd-global-config "/path/to/global_conf.py")
+;;
+;; Then you'll want to configure your "extra-config whitelist"
+;; patterns. These patterns determine which extra-conf files will get
+;; loaded automatically by ycmd. So, for example, if you want to make
+;; sure that ycmd will automatically load all of the extra-conf files
+;; underneath your "~/projects" directory, do this:
+;;
+;;   (set-variable 'ycmd-extra-conf-whitelist '("~/projects/*"))
+;;
+;; Now, wo start a ycmd server, use 'ycmd-open. Then you can use
+;; 'ycmd-get-completions to get completions at some point in a
+;; file. For example:
+;;
+;;   (ycmd-open)
 ;;   (ycmd-get-completions)
 ;;
 ;; You can use 'ycmd-display-completions to toy around with completion

  :type '(repeat string)
  :group 'ycmd)

(defun ycmd-open (filename)
  "Start a new ycmd server using the 'ycm extra conf' file FILENAME.

This kills any ycmd server already running (under ycmd.el's
control.) The newly started server will have a new HMAC secret."
  (interactive
  (list
   (read-file-name "Filename: ")))
  
  (ycmd-close)
  
  (let ((hmac-secret (ycmd--generate-hmac-secret)))
    (ycmd--start-server hmac-secret)
    (setq ycmd--hmac-secret hmac-secret)
    (ycmd-load-conf-file filename))

  (ycmd--start-notification-timer)


instance. This function effectively produces the contents of that
file."
  (let ((hmac-secret (base64-encode-string hmac-secret))
        (global-config (or ycmd-global-config ""))
        (extra-conf-whitelist (or ycmd-extra-conf-whitelist [])))
    `((filetype_blacklist (vimwiki . 1) (mail . 1) (qf . 1) (tagbar . 1) (unite . 1) (infolog . 1) (notes . 1) (text . 1) (pandoc . 1) (markdown . 1))
      (auto_start_csharp_server . 1)
      (filetype_whitelist (* . 1))
