Compare commits

...

2 Commits

Author SHA1 Message Date
Jeremy Dormitzer
2aaac9da66 Fix regex for maven test to be case-sensitive 2022-04-06 11:28:16 -04:00
Jeremy Dormitzer
530952f046 Switch to undo-fu instead of undo-tree 2022-04-06 11:28:06 -04:00
3 changed files with 8 additions and 12 deletions

View File

@ -11,7 +11,7 @@
"j" #'evil-next-visual-line "j" #'evil-next-visual-line
"k" #'evil-previous-visual-line) "k" #'evil-previous-visual-line)
:custom :custom
(evil-undo-system 'undo-tree) (evil-undo-system 'undo-fu)
(evil-split-window-below t) (evil-split-window-below t)
(evil-vsplit-window-right t)) (evil-vsplit-window-right t))

View File

@ -246,14 +246,16 @@
:command-line "mvn exec:java" :command-line "mvn exec:java"
:working-dir project-dir) :working-dir project-dir)
(when-let ((test-class (and (buffer-file-name) (when-let ((test-class (and (buffer-file-name)
(string-match-p ".*\\(Test\\|IT\\).*\\.java$" (buffer-file-name)) (let ((case-fold-search nil))
(string-match-p ".*\\(Test\\|IT\\).*\\.java$" (buffer-file-name)))
(fboundp 'dap-java-test-class) (fboundp 'dap-java-test-class)
(dap-java-test-class)))) (dap-java-test-class))))
(list :command-name "test this class" (list :command-name "test this class"
:command-line (format "mvn test -Dtest=%s" test-class) :command-line (format "mvn test -Dtest=%s" test-class)
:working-dir project-dir)) :working-dir project-dir))
(when-let ((test-method (and (buffer-file-name) (when-let ((test-method (and (buffer-file-name)
(string-match-p ".*\\(Test\\|IT\\).*\\.java$" (buffer-file-name)) (let ((case-fold-search nil))
(string-match-p ".*\\(Test\\|IT\\).*\\.java$" (buffer-file-name)))
(fboundp 'dap-java-test-method-at-point) (fboundp 'dap-java-test-method-at-point)
(dap-java-test-method-at-point t)))) (dap-java-test-method-at-point t))))
(list :command-name "test this method" (list :command-name "test this method"

View File

@ -1,13 +1,7 @@
;; -*- lexical-binding: t; -*- ;; -*- lexical-binding: t; -*-
;; Tree-shaped undos (use-package undo-fu)
(use-package undo-tree (use-package undohist
:demand t :hook (after-init . undohist-initialize))
:config
(global-undo-tree-mode)
:bind ("C-c C-r" . undo-tree-visualize)
:custom
(undo-tree-history-directory-alist
`(("." . ,(expand-file-name (concat user-emacs-directory "undo-history"))))))
(provide 'init-undo) (provide 'init-undo)