         ("M-<return>"   . nil)
         ("S-C-<return>" . nil))
   :init
-  (add-hook 'parinfer-mode-hook 'lispy-mode))
+  (add-hook 'parinfer-mode-enable-hook 'lispy-mode))
 
 (use-package rainbow-delimiters
   :ensure t

(use-package parinfer
  :ensure t
  :commands parinfer-mode
  :diminish parinfer " Ⓟ"
  :bind
  (:map parinfer-mode-map
        ("C-c <return>" . parinfer-toggle-mode))
  :init
  (setq parinfer-extensions '(defaults pretty-parens lispy smart-tab smart-yank)
        parinfer-auto-switch-indent-mode t))

(use-package lispy
  :ensure t
  :diminish lispy-mode " Ⓛ"
  :commands lispy-mode
  :bind
  (:map lispy-mode-map

        ("<s-left>"  . special-lispy-barf)
        ("<s-right>" . special-lispy-slurp))
  :init
  (add-hook 'emacs-lisp-mode-hook 'parinfer-mode)
  (add-hook 'emacs-lisp-mode-hook 'prettify-symbols-mode)
  (add-hook 'emacs-lisp-mode-hook 'eldoc-mode)
  (add-hook 'emacs-lisp-mode-hook '(lambda () (add-to-list 'completion-styles 'initials t)))
  (add-hook 'emacs-lisp-mode-hook '(lambda () (set (make-local-variable 'company-backends)
                                              '((company-elisp
                                                 company-yasnippet
                                                 :with
                                                 company-capf
                                                 company-keywords
                                                 company-abbrev
                                                 company-dabbrev-code
                                                 company-dabbrev
                                                 company-files)))))
  (add-hook 'emacs-lisp-mode-hook '(lambda () (progn (flycheck-mode)
                                                (eval-after-load 'flycheck
                                                  '(flycheck-package-setup)))))
  (add-hook 'emacs-lisp-mode-hook '(lambda () (setq-local counsel-dash-docsets '("Emacs_Lisp"))))
  (add-hook 'emacs-lisp-mode-hook '(lambda () (progn (require 'ert)
                                                (ert--activate-font-lock-keywords))))
  :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))

(use-package litable
  :ensure t
  :commands litable-mode
  :diminish litable-mode " Ⓣ")

(use-package flycheck-package
  :ensure t
  :commands flycheck-package-setup)

(use-package racket-mode
