Replace show-paren-mode with show-smartparens-mode

show-smartparens-mode offers better highlighting: it can highlights pair
recognized by Smartparens, including pairs such as \\(\\) and XML tags.
This commit is contained in:
Tu Do 2015-03-31 13:33:12 +07:00 committed by syl20bnr
parent fd1f524aff
commit f92a5e63a6
2 changed files with 4 additions and 2 deletions

View file

@ -114,8 +114,7 @@ It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'."
(setq initial-major-mode 'text-mode)
;; whitespace-mode
(add-hook 'prog-mode-hook (lambda () (setq show-trailing-whitespace 1)))
;; When point is on paranthesis, highlight the matching one
(show-paren-mode t)
;; use only spaces and no tabs
(setq-default indent-tabs-mode nil
default-tab-width 2)

View file

@ -2504,6 +2504,9 @@ displayed in the mode-line.")
(require 'smartparens-config)
(spacemacs|diminish smartparens-mode " (Ⓢ)" " (S)")
;; When point is on a pair, highlight the matching one
(show-smartparens-global-mode +1)
(defun spacemacs/smartparens-pair-newline (id action context)
(save-excursion
(newline)