diff options
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/lisp/init-clojure.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-clojure.el b/.emacs.d/lisp/init-clojure.el index 6dd16cb..e26a769 100644 --- a/.emacs.d/lisp/init-clojure.el +++ b/.emacs.d/lisp/init-clojure.el @@ -154,6 +154,12 @@ (list beg end (completion-table-dynamic (lambda (_) completion)) :annotation-function #'cider-annotate-symbol)))) (advice-add 'cider-complete-at-point :override 'my/cider-complete-at-point) + + (defun fix-duplicate-windows () + "When all windows are the same, delete all of them except the current one." + (when (apply #'eq (mapcar 'window-buffer (window-list))) + (delete-other-windows))) + (advice-add #'cider-close-ancillary-buffers :after #'fix-duplicate-windows) :bind (:map cider-mode-map ("C-c M-l" . cider-load-file) |