1
0
Fork 0

[oni-groovy] Add ‘/’ as a pair for smartparens

This commit is contained in:
Tom Willemse 2022-09-27 23:45:25 -07:00
parent 81b630718c
commit 8b71ddf093

View file

@ -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)