emacs 2025-11-15

(using spacemacs) I've enabled projectile-create-missing-test-files to automatically create a test file when I invoke projectile-find-implementation-or-test That works, but I'd like to change the default template, specifically to modify :require to contain [clojure.test :refer [deftest is testing]] How can I do that?

If you use clj-refactor, it defines a cljr-clojure-test-declaration that you can override, e.g.

;; override clj-refactor template
(defcustom cljr-clojure-test-declaration "[clojure.test :as t :refer [deftest is testing]]"
  "The require form to use when clojure.test is in use in a clj file."
  :type 'string
  :safe #'stringp)

👍 1