Skip to content

Commit

Permalink
Fix syl20bnr#16155 smartparens disabled after auto-complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Julio authored and smile13241324 committed Nov 26, 2023
1 parent 63b986b commit 8f70193
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layers/+completion/auto-completion/funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -395,14 +395,14 @@ MODE parameter must match the :modes values used in the call to
;; As `hippie-expand' is less frequently used than yasnippet I think it is
;; better to have smartparens state preserved with the default case.

(defvar spacemacs--smartparens-enabled-initially t
(defvar spacemacs--smartparens-enabled-initially nil
"Stored whether smartparens is originally enabled or not.")

(defun spacemacs//smartparens-disable-before-expand-snippet ()
"Handler for `yas-before-expand-snippet-hook'.
Disable smartparens and remember its initial state."
;; Remember the initial smartparens state only once, when expanding a top-level snippet.
(setq spacemacs--smartparens-enabled-initially (or smartparens-mode smartparens-strict-mode))
(setq spacemacs--smartparens-enabled-initially (or spacemacs--smartparens-enabled-initially smartparens-mode smartparens-strict-mode))
(spacemacs//deactivate-smartparens))

(defun spacemacs//smartparens-restore-after-exit-snippet ()
Expand Down

0 comments on commit 8f70193

Please sign in to comment.