From 284b6769343ce3bbe068d3c48bc7e2a9a3f31581 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 27 Dec 2015 02:51:05 -0500 Subject: [PATCH] Move ycm-smartparens fix to core-yasnippet.el --- core/core-editor.el | 6 +----- core/core-yasnippet.el | 5 ++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index 063dfa362..bdb894192 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -218,11 +218,7 @@ enable multiple minor modes for the same regexp.") (sp-local-pair "{{!--" "--}}" :post-handlers '(("||\n[i]" "RET") ("| " "SPC"))) (sp-local-pair "<%" "%>" :post-handlers '(("||\n[i]" "RET") ("| " "SPC"))) (sp-local-pair "{!!" "!!}" :post-handlers '(("||\n[i]" "RET") ("| " "SPC"))) - (sp-local-pair "{#" "#}" :post-handlers '(("||\n[i]" "RET") ("| " "SPC")))) - - ;; (after! yasnippet - ;; (advice-add 'yas-expand :before 'sp-remove-active-pair-overlay)) - ) + (sp-local-pair "{#" "#}" :post-handlers '(("||\n[i]" "RET") ("| " "SPC"))))) (use-package help-fns+ ; Improved help commands :commands (describe-buffer describe-command describe-file diff --git a/core/core-yasnippet.el b/core/core-yasnippet.el index f9103f348..10d0f0ff3 100644 --- a/core/core-yasnippet.el +++ b/core/core-yasnippet.el @@ -70,7 +70,10 @@ (defadvice yas-expand-snippet (around yas-expand-snippet-visual-line activate) (when (narf/evil-visual-line-state-p) (ad-set-arg 2 (1- (ad-get-arg 2)))) ad-do-it) - ) + + ;; Fix an issue with smartparens' keybindings interfering with yasnippet keybindings. + (after! yasnippet + (advice-add 'yas-expand :before 'sp-remove-active-pair-overlay))) (provide 'core-yasnippet) ;;; core-yasnippet.el ends here