aboutsummaryrefslogtreecommitdiffstats
path: root/oni-groovy.el
diff options
context:
space:
mode:
authorGravatar Tom Willemse2022-09-27 23:45:25 -0700
committerGravatar Tom Willemse2022-09-27 23:45:25 -0700
commit8b71ddf0932cfd2e17ca904df633d6de122cec71 (patch)
tree6f4f07654b94a2ef2a064b3e25344d58cda9c5ce /oni-groovy.el
parent81b630718c27dfe02ee2b5f2bbc6922caa6b61d4 (diff)
downloademacs-config-8b71ddf0932cfd2e17ca904df633d6de122cec71.tar.gz
emacs-config-8b71ddf0932cfd2e17ca904df633d6de122cec71.zip
[oni-groovy] Add ‘/’ as a pair for smartparens
Diffstat (limited to 'oni-groovy.el')
-rw-r--r--oni-groovy.el9
1 files changed, 7 insertions, 2 deletions
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 <tom@ryuslash.org>
;; 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)