Skip to content

Commit

Permalink
Redo groovy and Jenkinsfile mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pkryger committed Dec 21, 2024
1 parent 67887bb commit b9d6793
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions after-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b9d6793

Please sign in to comment.