smartparens: improve brace autoclosing

This commit is contained in:
Henrik Lissner 2016-01-18 01:44:15 -05:00
parent 57a69602e8
commit aac4d4ee48

View file

@ -169,11 +169,11 @@ enable multiple minor modes for the same regexp.")
(add-hook 'evil-replace-state-exit-hook 'turn-on-smartparens-mode)
;; Auto-close more conservatively
(sp-pair "{" "}" :post-handlers '(("||\n[i]" "RET") ("| " " "))
(sp-pair "{" nil :post-handlers '(("||\n[i]" "RET") ("| " " "))
:unless '(sp-point-before-word-p sp-point-before-same-p))
(sp-pair "(" ")" :post-handlers '(("||\n[i]" "RET") ("| " " "))
(sp-pair "(" nil :post-handlers '(("||\n[i]" "RET") ("| " " "))
:unless '(sp-point-before-word-p sp-point-before-same-p))
(sp-pair "[" "]" :post-handlers '(("| " " "))
(sp-pair "[" nil :post-handlers '(("| " " "))
:unless '(sp-point-before-word-p sp-point-before-same-p))
;; Support for generics/templates