[oni-groovy] Add ‘/’ as a pair for smartparens
This commit is contained in:
parent
81b630718c
commit
8b71ddf093
1 changed files with 7 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2022.0920.133859
|
;; Version: 2022.0926.132722
|
||||||
;; Package-Requires: (groovy-mode oni-embrace oni-smartparens groovy-imports rainbow-delimiters jenkinsfile-mode)
|
;; 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
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -26,8 +26,9 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'groovy-mode)
|
|
||||||
(require 'groovy-imports)
|
(require 'groovy-imports)
|
||||||
|
(require 'groovy-mode)
|
||||||
|
(require 'smartparens)
|
||||||
|
|
||||||
(defun oni-groovy--auto-fill-mode ()
|
(defun oni-groovy--auto-fill-mode ()
|
||||||
"Enable ‘auto-fill-mode’ only for comments."
|
"Enable ‘auto-fill-mode’ only for comments."
|
||||||
|
@ -66,6 +67,9 @@
|
||||||
(setq-local beginning-of-defun-function #'oni-groovy-beginning-of-defun
|
(setq-local beginning-of-defun-function #'oni-groovy-beginning-of-defun
|
||||||
end-of-defun-function #'oni-groovy-end-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)
|
(define-key groovy-mode-map (kbd "M-I") 'groovy-imports-add-import-dwim)
|
||||||
|
|
||||||
(add-hook 'groovy-mode-hook #'oni-groovy-setup-defun-navigation)
|
(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 'electric-indent-local-mode)
|
||||||
(add-hook 'groovy-mode-hook 'groovy-imports-scan-file)
|
(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--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 'rainbow-delimiters-mode)
|
||||||
(add-hook 'groovy-mode-hook 'smartparens-mode)
|
(add-hook 'groovy-mode-hook 'smartparens-mode)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue