diff --git a/oni-groovy.el b/oni-groovy.el index 381c0ad..b8f5211 100644 --- a/oni-groovy.el +++ b/oni-groovy.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2022.0920.133859 +;; Version: 2022.0926.132722 ;; Package-Requires: (groovy-mode oni-embrace oni-smartparens groovy-imports rainbow-delimiters jenkinsfile-mode) ;; This program is free software; you can redistribute it and/or modify @@ -26,8 +26,9 @@ ;;; Code: -(require 'groovy-mode) (require 'groovy-imports) +(require 'groovy-mode) +(require 'smartparens) (defun oni-groovy--auto-fill-mode () "Enable ‘auto-fill-mode’ only for comments." @@ -66,6 +67,9 @@ (setq-local beginning-of-defun-function #'oni-groovy-beginning-of-defun end-of-defun-function #'oni-groovy-end-of-defun)) +(defun oni-groovy-setup-smartparens () + (sp-local-pair '(groovy-mode) "/" "/")) + (define-key groovy-mode-map (kbd "M-I") 'groovy-imports-add-import-dwim) (add-hook 'groovy-mode-hook #'oni-groovy-setup-defun-navigation) @@ -73,6 +77,7 @@ (add-hook 'groovy-mode-hook 'electric-indent-local-mode) (add-hook 'groovy-mode-hook 'groovy-imports-scan-file) (add-hook 'groovy-mode-hook 'oni-groovy--auto-fill-mode) +(add-hook 'groovy-mode-hook 'oni-groovy-setup-smartparens) (add-hook 'groovy-mode-hook 'rainbow-delimiters-mode) (add-hook 'groovy-mode-hook 'smartparens-mode)