Skip to content

Commit

Permalink
Tune groovy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pkryger committed Dec 21, 2024
1 parent b9d6793 commit a956609
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions after-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -606,12 +606,18 @@ See: https://github.com/PrincetonUniversity/blocklint"
(set-time-zone-rule "/usr/share/zoneinfo/Europe/London")



(use-package groovy-mode
:defer t
:init
(defun pk/groovy-mode--create-test-files ()
(setq-local projectile-create-missing-test-files t))
:hook
;; Jenkinsfile is registered in autoloads of groovy-mode, let's remove it
;; and make it clear that jenkinsfile-mode will take over
(setq auto-mode-alist
(cl-remove-if (lambda (entry)
(and (string-match-p "Jenkinsfile" (car entry))
(eq 'groovy-mode (cdr entry))))
auto-mode-alist)) :hook
((groovy-mode . yas-minor-mode)
(groovy-mode . pk/groovy-mode--create-test-files)))

Expand All @@ -620,14 +626,8 @@ See: https://github.com/PrincetonUniversity/blocklint"
:init
(use-package flycheck
:autoload (flycheck-add-mode))
:defer t
:config
(flycheck-add-mode 'groovy 'jenkinsfile-mode)
(setq auto-mode-alist
(cl-remove-if (lambda (entry)
(and (string-match-p "Jenkinsfile" (car entry))
(eq 'groovy-mode (cdr entry))))
auto-mode-alist)))
(flycheck-add-mode 'groovy 'jenkinsfile-mode))

(use-package yasnippet
:defines (yas-snippet-dirs)
Expand Down

0 comments on commit a956609

Please sign in to comment.