From b9d6793cc22e36da8ac4584517707861c203d80b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Kryger?= Date: Sat, 21 Dec 2024 10:25:01 +0000 Subject: [PATCH] Redo groovy and Jenkinsfile mode --- after-init.el | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/after-init.el b/after-init.el index 00e72f0..d013050 100644 --- a/after-init.el +++ b/after-init.el @@ -606,22 +606,28 @@ See: https://github.com/PrincetonUniversity/blocklint" (set-time-zone-rule "/usr/share/zoneinfo/Europe/London") -(use-package jenkinsfile-mode - :init - (use-package flycheck - :autoload (flycheck-add-mode)) - :defer t - :config - (flycheck-add-mode 'groovy 'jenkinsfile-mode)) (use-package groovy-mode - :after (yasnippet projectile) :init (defun pk/groovy-mode--create-test-files () (setq-local projectile-create-missing-test-files t)) :hook ((groovy-mode . yas-minor-mode) (groovy-mode . pk/groovy-mode--create-test-files))) + +(use-package jenkinsfile-mode + :after (groovy-mode) + :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))) (use-package yasnippet :defines (yas-snippet-dirs)