Fix web-mode deferred load * fix smartparens

This commit is contained in:
Henrik Lissner 2015-02-02 02:01:29 -05:00
parent d6985d5b58
commit 1aec999f63
2 changed files with 4 additions and 3 deletions

View file

@ -18,8 +18,8 @@
sp-autoescape-string-quote nil) sp-autoescape-string-quote nil)
;; Handle newlines + spaces ;; Handle newlines + spaces
(sp-pair "{" "}" :post-handlers '(("||\n[i]" "RET") ("| " "SPC")) :unless '(sp-point-before-word-p sp-point-before-same-p)) (sp-pair "{" "}" :post-handlers '(("||\n[i]" "RET") ("| " " ")) :unless '(sp-point-before-word-p sp-point-before-same-p))
(sp-pair "(" ")" :post-handlers '(("||\n[i]" "RET") ("| " "SPC")) :unless '(sp-point-before-word-p sp-point-before-same-p)) (sp-pair "(" ")" :post-handlers '(("||\n[i]" "RET") ("| " " ")) :unless '(sp-point-before-word-p sp-point-before-same-p))
;; Auto-close more conservatively ;; Auto-close more conservatively
(sp-pair "[" nil :unless '(sp-point-before-word-p sp-point-before-same-p)) (sp-pair "[" nil :unless '(sp-point-before-word-p sp-point-before-same-p))
@ -27,7 +27,7 @@
(sp-pair "\"" nil :unless '(sp-point-after-word-p sp-point-before-word-p sp-point-before-same-p)) (sp-pair "\"" nil :unless '(sp-point-after-word-p sp-point-before-word-p sp-point-before-same-p))
(sp-with-modes '(json-mode js2-mode ruby-mode enh-ruby-mode python-mode) (sp-with-modes '(json-mode js2-mode ruby-mode enh-ruby-mode python-mode)
(sp-local-pair "[" "]" :post-handlers '(:add "| " "SPC"))) (sp-local-pair "[" nil :post-handlers '(("||\n[i]" "RET"))))
(after "yasnippet" (after "yasnippet"
(defadvice yas-expand (before advice-for-yas-expand activate) (defadvice yas-expand (before advice-for-yas-expand activate)

View file

@ -6,6 +6,7 @@
(bind 'motion css-mode-map "gQ" 'web-beautify-css))) (bind 'motion css-mode-map "gQ" 'web-beautify-css)))
(use-package web-mode (use-package web-mode
:commands web-mode
:mode (("\\.\\(p\\)?htm\\(l\\)?$" . web-mode) :mode (("\\.\\(p\\)?htm\\(l\\)?$" . web-mode)
("\\.tpl\\(\\.php\\)?$" . web-mode) ("\\.tpl\\(\\.php\\)?$" . web-mode)
("\\.erb$" . web-mode) ("\\.erb$" . web-mode)