about summary refs log tree commit diff stats
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2021-09-23 15:53:48 +0100
committerDavid Morgan <djm_uk@protonmail.com>2021-09-23 15:53:48 +0100
commitb9fe010a020eb24fd520bd27b8be212a1527e909 (patch)
treea2374e583d499c86c2c025f646886ad6cdfe7dc7 /.emacs.d/lisp
parent3a1d22524c4893906aae840f3d28f8e047ec5ee1 (diff)
downloaddotfiles-b9fe010a020eb24fd520bd27b8be212a1527e909.tar.gz
Make CIDER repl history file relative to project dir
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-clojure.el10
1 files changed, 2 insertions, 8 deletions
diff --git a/.emacs.d/lisp/init-clojure.el b/.emacs.d/lisp/init-clojure.el
index 215b52c..7e52e4c 100644
--- a/.emacs.d/lisp/init-clojure.el
+++ b/.emacs.d/lisp/init-clojure.el
@@ -31,14 +31,9 @@
 (use-package cider
   :diminish
   :config
-  (defun set-project-repl-history ()
-    (let ((project-name (file-name-nondirectory (directory-file-name (project-root (project-current))))))
-      (when (> (length project-name) 0)
-        (setq-local cider-repl-history-file (expand-file-name (concat "cider-history-" project-name) user-emacs-directory)))))
   (defun cider-repl-mode-hook-fn ()
     (display-line-numbers-mode -1)
-    (subword-mode +1)
-    (set-project-repl-history))
+    (subword-mode +1))
   (setq cider-repl-pop-to-buffer-on-connect 'display-only
         cider-repl-display-help-banner nil
         cider-repl-history-highlight-current-entry t
@@ -48,8 +43,7 @@
         cider-save-file-on-load t
         ;; cider-invert-insert-eval-p t
         ;; cider-switch-to-repl-on-insert nil
-        ;; Default cider-repl-history file
-        cider-repl-history-file (expand-file-name "cider-history" user-emacs-directory)
+        cider-repl-history-file ".cider-repl-history"
         nrepl-log-messages t
         clojure-toplevel-inside-comment-form t)
   (unbind-key "C-c C-l" cider-mode-map)