mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-19 13:43:36 -05:00
Move smartparens config for web-mode into init-web.el
This commit is contained in:
@@ -22,6 +22,17 @@
|
||||
web-mode-script-padding 2
|
||||
web-mode-block-padding 2)
|
||||
|
||||
(after "smartparens"
|
||||
(add-hook! 'web-mode-hook (setq web-mode-enable-auto-pairing nil))
|
||||
|
||||
(defun sp-web-mode-is-code-context (id action context)
|
||||
(when (and (eq action 'insert)
|
||||
(not (or (get-text-property (point) 'part-side)
|
||||
(get-text-property (point) 'block-side))))
|
||||
t))
|
||||
|
||||
(sp-local-pair 'web-mode "<" nil :when '(sp-web-mode-is-code-context)))
|
||||
|
||||
(after "web-beautify"
|
||||
(add-hook! 'web-mode-hook (setenv "jsbeautify_indent_size" "4"))
|
||||
(bind 'motion web-mode-map "gQ" 'web-beautify-html))
|
||||
|
Reference in New Issue
Block a user