diff options
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -2202,6 +2202,26 @@ (setq mode-name "λ")) :hook (clojure-mode . jao-clojure--fix-things)) +(defun jao-cider-test-ns (ns) + (let ((parts (string-split ns "\\."))) + (if (string= "test" (cadr parts)) + ns + (mapconcat #'identity (cons (car parts) (cons "test" (cdr parts))) ".")))) + +(defun jao-kaocha-file-name () + (let* ((filename (match-string 2)) + (path (replace-regexp-in-string "\\." "/" (match-string 1)))) + (substring-no-properties (concat "test/" path filename)))) + +(defconst jao-kaocha-compilation-error + '(kaocha-error "^FAIL in \\(.+\\.\\)[^ ]+ (\\([^:]+\\.clj[cs]?\\):\\([0-9]+\\))" + jao-kaocha-file-name 3)) + +(use-package compile + :config + (add-to-list 'compilation-error-regexp-alist-alist + jao-kaocha-compilation-error)) + (use-package cider :ensure t :commands cider-mode @@ -2220,6 +2240,7 @@ cider-repl-use-pretty-printing t cider-show-error-buffer 'except-in-repl cider-test-show-report-on-success nil + cider-test-infer-test-ns #'jao-cider-test-ns cider-use-fringe-indicators nil cider-use-overlays nil clojure-docstring-fill-column 72 |