   :config
   ;; since C-j is shadowed by smartparens
   (bind-keys :map lisp-mode-shared-map
-	     ("<C-return>" . eval-last-sexp)
-	     ("<M-return>" . eval-print-last-sexp)
-	     ("<C-M-return>" . eval-defun)
-	     ("<C-S-return>" . eval-region)
-	     ("<M-S-return>" . eval-buffer)
-	     ("<C-M-S-return>" . load-file)))
+             ("<C-return>" . eval-last-sexp)
+             ("<M-return>" . eval-print-last-sexp)
+             ("<C-M-return>" . eval-defun)
+             ("<C-S-return>" . eval-region)
+             ("<M-S-return>" . eval-buffer)
+             ("<C-M-S-return>" . load-file)))
 
 (use-package clojure-mode
-  ;; defer until the mode is needed
+  ;; defer til the mode is needed
   ;; see mode info: C-h v auto-mode-alist
   :mode
   ("\\(?:build\\|profile\\)\\.boot\\'" . clojure-mode)

        neo-smart-open t))

(use-package ido
  ;; don't need ido if I just want to click open some file
  ;; slow to load, defer until main functions are called
  ;; or til idle for one sec
  :defer 1
  :bind
  ("C-x C-f" . ido-find-file) ;; C-f again for normal find
  ("C-x b" . ido-switch-buffer) 
  :config
  (ido-mode 1)
  (ido-everywhere 1)
  (setq ido-enable-flex-matching t

      ("<C-left>"  . mc/unmark-next-like-this))

    (use-package expand-region
      ;; defer til the main function is called
      :bind ("S-SPC" . er/expand-region))))

(use-package yasnippet
  ;; defer til the mode is called
  :bind ("<C-S-tab>" . yas-minor-mode)
  :init (setq yas-snippet-dirs '(yas-installed-snippets-dir))
  :config (diminish 'yas-minor-mode " Y")
  (add-hook 'yas-minor-mode-hook 'yas-reload-all)
  (bind-key "<S-tab>" 'yas-expand yas-minor-mode-map)
  (unbind-key "<tab>" yas-minor-mode-map)
  (unbind-key "TAB" yas-minor-mode-map))

(use-package company
  ;; defer til the mode is called
  :bind ("<C-tab>" . company-mode)
  :diminish " K"
  :config
  (unbind-key "<tab>" company-active-map)
  (unbind-key "TAB" company-active-map)
  (setq company-idle-delay 0
        company-tooltip-align-annotations t)

  (use-package company-math
    :config (add-to-list 'company-backends 'company-math-symbols-unicode))
  
  (use-package company-quickhelp
    :config (company-quickhelp-mode 1))
  
  (use-package company-flx
    ;; defer til the mode is called
    :bind ("<C-M-tab>" . company-flx-mode)))

(use-package flycheck
  ;; defer til the mode is called
  :bind ("<C-M-S-tab>" . flycheck-mode)
  :config (use-package flycheck-pos-tip
            :config (setq flycheck-display-errors-function
                          #'flycheck-pos-tip-error-messages)))

(use-package flyspell
  ;; defer til the mode is called
  :diminish " $"
  :bind ("C-$" . flyspell-mode))

;;;;;;;;;;;;;;;;;;;;;;
;; custom functions ;;
