 ;;; Code:
 (use-package parinfer
   :ensure t
-  :commands parinfer-mode
-  :bind
-  (:map parinfer-mode-map
-        ("C-c <return>" . parinfer-toggle-mode))
+  :commands parinfer-mode parinfer-toggle-mode
   :config
   (setq parinfer-extensions '(defaults pretty-parens lispy smart-tab smart-yank one paredit)
         parinfer-preview-cursor-scope t))

  :init
  (add-hook 'clojure-mode-hook
            '(lambda () (progn
                          (parinfer-mode)
                          (setq-local company-backends '((company-capf
                                                          company-yasnippet
                                                          :with
                                                          company-abbrev
                                                          company-dabbrev-code
                                                          company-dabbrev
                                                          company-files)))
                          (setq-local counsel-dash-docsets '("Clojure"))))))

(use-package cider
  :ensure t

  ("\\.el$" . emacs-lisp-mode)
  :interpreter
  ("emacs" . emacs-lisp-mode)
  :init
  (add-hook 'emacs-lisp-mode-hook
            '(lambda () (progn
                     (parinfer-mode)
                     (prettify-symbols-mode)
                     (eldoc-mode)
                     (erefactor-lazy-highlight-turn-on)
                     (require 'ert)
                     (ert--activate-font-lock-keywords)
                     (add-to-list 'completion-styles 'initials t)
                     (setq-local company-backends '((company-elisp
                                                     company-yasnippet
                                                     :with
                                                     company-capf
                                                     company-abbrev
                                                     company-dabbrev-code
                                                     company-dabbrev
                                                     company-files)))
                     (flycheck-mode)
                     (eval-after-load 'flycheck '(flycheck-package-setup))
                     (setq-local counsel-dash-docsets '("Emacs_Lisp")))))
  :config
  (setq flycheck-emacs-lisp-load-path 'inherit
        lisp-prettify-symbols-alist   '(("lambda" . ?λ)
                                        ("->"     . ?→)
                                        ("=>"     . ?⇒)
                                        ("map"    . ?↦)
                                        ("."      . ?•))
        prettify-symbols-alist lisp-prettify-symbols-alist
        prettify-symbols-unprettify-at-point 'right-edge))

