I usually have several workspaces with different Clojure projects opened. (in fact, with different worktrees) I want each workspace to have its own *test-report* and *cider-repl* when these buffers were opened. I’ve been doing this for a couple of days and it’s working for me:
;; include cider buffer into current workspace
(add-hook 'cider-repl-mode-hook
(lambda ()
(persp-add-buffer (current-buffer))))
;; include test-report buffer into current workspace
(add-hook 'cider-test-report-mode-hook
(lambda ()
(persp-add-buffer (current-buffer))))
;; include temp buffers created by cider into current workspace
(add-hook 'cider-popup-buffer-mode-hook
(lambda ()
(persp-add-buffer (current-buffer))))
Is there a better way to make this work?