Merge pull request #4414 from nbfalcon/bugfix/evil-ex-smartparens
Enable `smartparens' for `evil'
This commit is contained in:
commit
6f5cde1386
1 changed files with 12 additions and 3 deletions
|
@ -505,10 +505,19 @@ files, so we replace calls to `pp' with the much faster `prin1'."
|
|||
(setf (alist-get key sp-message-alist) nil))
|
||||
|
||||
(add-hook! 'eval-expression-minibuffer-setup-hook
|
||||
(defun doom-init-smartparens-in-minibuffer-maybe-h ()
|
||||
(defun doom-init-smartparens-in-eval-expression-h ()
|
||||
"Enable `smartparens-mode' in the minibuffer for `eval-expression'.
|
||||
Only enable it if `smartparens-global-mode' is on."
|
||||
(when smartparens-global-mode (smartparens-mode))))
|
||||
This includes everything that calls `read--expression', e.g.
|
||||
`edebug-eval-expression' Only enable it if
|
||||
`smartparens-global-mode' is on."
|
||||
(when smartparens-global-mode (smartparens-mode +1))))
|
||||
(add-hook! 'minibuffer-setup-hook
|
||||
(defun doom-init-smartparens-in-minibuffer-maybe-h ()
|
||||
"Enable `smartparens' for non-`eval-expression' commands.
|
||||
Only enable `smartparens-mode' if `smartparens-global-mode' is
|
||||
on."
|
||||
(when (and smartparens-global-mode (memq this-command '(evil-ex)))
|
||||
(smartparens-mode +1))))
|
||||
|
||||
;; You're likely writing lisp in the minibuffer, therefore, disable these
|
||||
;; quote pairs, which lisps doesn't use for strings:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue