From debd7a010b145be72bd2d43200e799059bc6f1cb Mon Sep 17 00:00:00 2001 From: timor Date: Thu, 23 Nov 2017 10:14:55 +0100 Subject: [PATCH] use evil-smartparens-mode for smartparens-strict mode This is more dwim in the sense that the normal deleting commands now behave more like paredit, i.e. region deletion is adjusted to always keep the pairs balanced. --- layers/+spacemacs/spacemacs-editing/packages.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/layers/+spacemacs/spacemacs-editing/packages.el b/layers/+spacemacs/spacemacs-editing/packages.el index 9ae528c4d..4132f5d05 100644 --- a/layers/+spacemacs/spacemacs-editing/packages.el +++ b/layers/+spacemacs/spacemacs-editing/packages.el @@ -25,6 +25,7 @@ (origami :toggle (eq 'origami dotspacemacs-folding-method)) password-generator smartparens + (evil-smartparens :toggle dotspacemacs-smartparens-strict-mode) (spacemacs-whitespace-cleanup :location local) string-inflection undo-tree @@ -274,6 +275,16 @@ "ipp" 'password-generator-phonetic "ipn" 'password-generator-numeric)))) +(defun spacemacs-editing/init-evil-smartparens () + (use-package evil-smartparens + :defer t + :init + (progn + (when dotspacemacs-smartparens-strict-mode + (spacemacs/add-to-hooks 'evil-smartparens-mode '(prog-mode-hook comint-mode-hook)))) + :config + (spacemacs|diminish evil-smartparens-mode))) + (defun spacemacs-editing/init-smartparens () (use-package smartparens :defer t