all repos — nixfiles @ f0643fdce54e5172a369e29d00356cb9bc4f6c8b

System and user configuration, managed by nix and home-manager

Emacs: Fix smartparens in web-mode

Alan Pearce
commit

f0643fdce54e5172a369e29d00356cb9bc4f6c8b

parent

4409f5fcef18a2d9a385f21422aaba863485429c

1 file changed, 3 insertions(+), 4 deletions(-)

jump to
M tag-emacs/emacs.d/init.orgtag-emacs/emacs.d/init.org
@@ -1960,9 +1960,8 @@ web-mode-script-padding 0
web-mode-comment-style 2 web-mode-enable-auto-pairing nil web-mode-enable-auto-quoting nil) - (with-eval-after-load 'smartparens - (sp-with-modes sp--html-modes - (sp-local-pair "<%" "%>"))))) + (sp-with-modes sp--html-modes + (sp-local-pair "<%" "%>")))) #+END_SRC I derived a mode for twig, in order to use its =mode-hook=.
@@ -2241,7 +2240,7 @@ (bind-key "M-<up>" #'sp-splice-sexp-killing-backward smartparens-mode-map)
(bind-key "M-<down>" #'sp-splice-sexp-killing-forward smartparens-mode-map) (bind-key "C-M-S-k" #'sp-kill-hybrid-sexp smartparens-mode-map) (bind-key "C-S-<right>" #'sp-slurp-hybrid-sexp smartparens-mode-map) - (sp-with-modes '(web-mode twig-mode) + (sp-with-modes '(twig-mode) (sp-local-pair "{%" "%}") (sp-local-pair "{{" "}}")) (show-smartparens-global-mode t)