Move smartparens configs to modules

This commit is contained in:
Henrik Lissner 2016-03-28 21:39:13 -04:00
parent 1c37aebd2e
commit f9e488cb0c
11 changed files with 98 additions and 61 deletions

View file

@ -27,6 +27,18 @@
c-tab-always-indent nil
c-electric-flag nil)
(defun narf/sp-point-is-template-p (id action context)
(and (sp-in-code-p id action context)
(sp-point-after-word-p id action context)))
(sp-local-pair 'c++-mode "<" ">" :when '(narf/sp-point-is-template-p))
(sp-with-modes '(c-mode c++-mode objc-mode java-mode)
(sp-local-pair "/*" "*/" :post-handlers '(("||\n[i]" "RET") ("| " "SPC")))
;; Doxygen blocks
(sp-local-pair "/**" "*/" :post-handlers '(("||\n[i]" "RET") ("||\n[i]" "SPC")))
(sp-local-pair "/*!" "*/" :post-handlers '(("||\n[i]" "RET") ("[d-1]< | " "SPC"))))
;; C/C++ Settings
(add-hook! (c-mode c++-mode)
(electric-indent-local-mode +1)