diff --git a/core/core-editor.el b/core/core-editor.el index 9bfe01957..48048e34c 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -196,14 +196,6 @@ savehist file." sp-max-prefix-length 50 sp-escape-quotes-after-insert nil) ; not smart enough - ;; Smartparens' navigation feature is neat, but does not justify how expensive - ;; it is. It's also less useful for evil users. This may need to be - ;; reactivated for non-evil users though. Needs more testing! - (defun doom|disable-smartparens-navigate-skip-match () - (setq sp-navigate-skip-match nil - sp-navigate-consider-sgml-tags nil)) - (add-hook 'after-change-major-mode-hook #'doom|disable-smartparens-navigate-skip-match) - ;; autopairing in `eval-expression' and `evil-ex' (defun doom|init-smartparens-in-eval-expression () "Enable `smartparens-mode' in the minibuffer, during `eval-expression' or diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 47faefde4..85272c466 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -36,6 +36,14 @@ ;; or specific :post-handlers with: ;; (sp-pair "{" nil :post-handlers '(:rem ("| " "SPC"))) (after! smartparens + ;; Smartparens' navigation feature is neat, but does not justify how + ;; expensive it is. It's also less useful for evil users. This may need to + ;; be reactivated for non-evil users though. Needs more testing! + (defun doom|disable-smartparens-navigate-skip-match () + (setq sp-navigate-skip-match nil + sp-navigate-consider-sgml-tags nil)) + (add-hook 'after-change-major-mode-hook #'doom|disable-smartparens-navigate-skip-match) + ;; Autopair quotes more conservatively; if I'm next to a word/before another ;; quote, I likely don't want to open a new pair. (let ((unless-list '(sp-point-before-word-p