Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.0 KiB

  1. ;;; prelude-clojure.el --- Emacs Prelude: Clojure programming configuration.
  2. ;;
  3. ;; Copyright © 2011-2021 Bozhidar Batsov
  4. ;;
  5. ;; Author: Bozhidar Batsov <bozhidar@batsov.com>
  6. ;; URL: https://github.com/bbatsov/prelude
  7. ;; This file is not part of GNU Emacs.
  8. ;;; Commentary:
  9. ;; A basic setup for Clojure programming based on clojure-mode
  10. ;; and CIDER.
  11. ;;; License:
  12. ;; This program is free software; you can redistribute it and/or
  13. ;; modify it under the terms of the GNU General Public License
  14. ;; as published by the Free Software Foundation; either version 3
  15. ;; of the License, or (at your option) any later version.
  16. ;;
  17. ;; This program is distributed in the hope that it will be useful,
  18. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. ;; GNU General Public License for more details.
  21. ;;
  22. ;; You should have received a copy of the GNU General Public License
  23. ;; along with GNU Emacs; see the file COPYING. If not, write to the
  24. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  25. ;; Boston, MA 02110-1301, USA.
  26. ;;; Code:
  27. (require 'prelude-lisp)
  28. (prelude-require-packages '(clojure-mode cider))
  29. (with-eval-after-load 'clojure-mode
  30. (defun prelude-clojure-mode-defaults ()
  31. (subword-mode +1)
  32. (run-hooks 'prelude-lisp-coding-hook))
  33. (setq prelude-clojure-mode-hook 'prelude-clojure-mode-defaults)
  34. (add-hook 'clojure-mode-hook (lambda ()
  35. (run-hooks 'prelude-clojure-mode-hook))))
  36. (with-eval-after-load 'cider
  37. (setq nrepl-log-messages t)
  38. (add-hook 'cider-mode-hook 'eldoc-mode)
  39. (defun prelude-cider-repl-mode-defaults ()
  40. (subword-mode +1)
  41. (run-hooks 'prelude-interactive-lisp-coding-hook))
  42. (setq prelude-cider-repl-mode-hook 'prelude-cider-repl-mode-defaults)
  43. (add-hook 'cider-repl-mode-hook (lambda ()
  44. (run-hooks 'prelude-cider-repl-mode-hook))))
  45. (provide 'prelude-clojure)
  46. ;;; prelude-clojure.el ends here