   :config
   (load-theme 'material t))
 
+(use-package paredit
+  :ensure t
+  :config
+  (add-hook 'emacs-lisp-mode-hook #'paredit-mode)
+  (add-hook 'lisp-interaction-mode-hook #'paredit-mode)
+  (add-hook 'ielm-mode-hook #'paredit-mode)
+  (add-hook 'lisp-mode-hook #'paredit-mode)
+  (add-hook 'eval-expression-minibuffer-setup-hook #'paredit-mode))
+
 (use-package paren
   :config
   (show-paren-mode 1))
-
-(use-package parinfer
-  :ensure t
-  :bind
-  (("C-," . parinfer-toggle-mode))
-  :init
-  (progn
-    (setq parinfer-extensions
-          '(defaults
-            pretty-parens
-            paredit
-            smart-tab
-            smart-yank)))
-  :config
-  (add-hook 'emacs-lisp-mode-hook #'parinfer-mode)
-  (add-hook 'lisp-interaction-mode-hook #'parinfer-mode)
-  (add-hook 'ielm-mode-hook #'parinfer-mode)
-  (add-hook 'lisp-mode-hook #'parinfer-mode)
-  (add-hook 'eval-expression-minibuffer-setup-hook #'parinfer-mode))
 
 (use-package projectile
   :ensure t

(use-package cider
  :after (clojure-mode)
  :ensure t
  :config
  (add-hook 'cider-mode-hook #'eldoc-mode)
  (add-hook 'cider-repl-mode-hook #'eldoc-mode)
  (add-hook 'cider-repl-mode-hook #'parinfer-mode)
  (add-hook 'cider-repl-mode-hook #'rainbow-delimiters-mode))

(use-package clojure-mode
  :ensure t
  :config
  (add-hook 'clojure-mode-hook #'parinfer-mode)
  (add-hook 'clojure-mode-hook #'subword-mode)
  (add-hook 'clojure-mode-hook #'rainbow-delimiters-mode))


(use-package rainbow-delimiters
  :ensure t)

(use-package whitespace
  :bind
  (([f1] . whitespace-cleanup))
  :init
  (dolist (hook '(prog-mode-hook text-mode-hook))
    (add-hook hook #'whitespace-mode))
  :config
  (setq whitespace-line-column 80
        whitespace-style '(face tabs empty trailing)))

(defun cider-show-repl-buffer ()
  (interactive)
  (let ((buffer (current-buffer)))
    (cider-switch-to-repl-buffer)
    (pop-to-buffer buffer)))

;; Changes from the customize UI
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
