(require 'init-clojure)

(when (maybe-require-package 'cider)
  (setq nrepl-popup-stacktraces nil)

  (after-load 'cider
    (add-hook 'cider-mode-hook 'eldoc-mode)
    (add-hook 'cider-repl-mode-hook 'subword-mode)
    (add-hook 'cider-repl-mode-hook 'paredit-mode)

    ;; nrepl isn't based on comint
    (add-hook 'cider-repl-mode-hook 'sanityinc/no-trailing-whitespace))

  (require-package 'flycheck-clojure)
  (after-load 'clojure-mode
    (after-load 'flycheck
      (flycheck-clojure-setup))))


(provide 'init-clojure-cider)

(require 'init-clojure)

(when (maybe-require-package 'cider)
  (setq nrepl-popup-stacktraces nil)

  (after-load 'cider
    (add-hook 'cider-mode-hook 'eldoc-mode)
    (add-hook 'cider-repl-mode-hook 'subword-mode)
    (add-hook 'cider-repl-mode-hook 'paredit-mode)

    ;; nrepl isn't based on comint
    (add-hook 'cider-repl-mode-hook 'sanityinc/no-trailing-whitespace))

  (require-package 'flycheck-clojure)
  (after-load 'clojure-mode
    (after-load 'cider
      (after-load 'flycheck
        (flycheck-clojure-setup)))))


(provide 'init-clojure-cider)

Load flycheck-clojure only after loading cider
Load flycheck-clojure only after loading cider

Fixes #502, thanks @picong

mmqmzk/emacs.d,wegatron/emacs.d,qianwan/emacs.d,sgarciac/emacs.d,purcell/emacs.d,krzysz00/emacs.d,blueabysm/emacs.d,emuio/emacs.d,kindoblue/emacs.d,me020523/emacs.d,benkha/emacs.d,blueseason/emacs.d,lust4life/emacs.d,kongfy/emacs.d,svenyurgensson/emacs.d,dcorking/emacs.d,braveoyster/emacs.d,baohaojun/emacs.d,cjqw/emacs.d,arthurl/emacs.d,gsmlg/emacs.d,roxolan/emacs.d