diff --git a/init.el b/init.el index 6d42f10..2e45e70 100644 --- a/init.el +++ b/init.el @@ -321,14 +321,19 @@ directory. Otherwise, run `find-file' on that file." ("C-c C-+" . evil-numbers/inc-at-pt-incremental) ("C-c C--" . evil-numbers/dec-at-pt-incremental))) (use-package evil-cleverparens - :hook ((prog-mode . evil-cleverparens-mode) + :hook ((prog-mode . my/-enable-evil-cleverparens) (evil-cleverparens-mode . paredit-mode)) :bind (:map paredit-mode-map ("C-" . paredit-RET) ("C-RET" . paredit-RET)) :custom (eldoc-add-command 'paredit-RET) - (evil-cleverparens-use-s-and-S nil)) + (evil-cleverparens-use-s-and-S nil) + :config + (defun my/-enable-evil-cleverparens () + (if (member major-mode '(common-lisp-mode emacs-lisp-mode)) + (evil-cleverparens-mode 1) + (electric-pair-local-mode 1)))) ;; make lisp editing nicer (use-package aggressive-indent @@ -1655,7 +1660,7 @@ one of the normal rainbow-delimiters-depth-N-face faces." (save-match-data (let* ((base-face (rainbow-delimiters-default-pick-face depth match loc)) (base-name (symbol-name base-face))) - (if (and adjust-parens-mode + (if (and (or evil-cleverparens-mode adjust-parens-mode) (eq ?\) (char-syntax (elt (buffer-substring-no-properties loc (1+ loc)) 0))) (string-match (rx string-start "rainbow-delimiters-depth-"