Fix error and clean
This commit is contained in:
parent
378b903566
commit
3f0a4e7adf
2 changed files with 5 additions and 5 deletions
|
@ -53,7 +53,7 @@
|
||||||
:config
|
:config
|
||||||
(add-hook! 'unityjs-mode-hook
|
(add-hook! 'unityjs-mode-hook
|
||||||
(enable-tab-width-2)
|
(enable-tab-width-2)
|
||||||
(setq js-indent-level 2))
|
(setq js-indent-level 2)))
|
||||||
|
|
||||||
|
|
||||||
(provide 'init-js)
|
(provide 'init-js)
|
||||||
|
|
|
@ -26,10 +26,10 @@
|
||||||
(add-hook! 'web-mode-hook (setq web-mode-enable-auto-pairing nil))
|
(add-hook! 'web-mode-hook (setq web-mode-enable-auto-pairing nil))
|
||||||
|
|
||||||
(defun sp-web-mode-is-code-context (id action context)
|
(defun sp-web-mode-is-code-context (id action context)
|
||||||
(when (and (eq action 'insert)
|
(when (and (eq action 'insert)
|
||||||
(not (or (get-text-property (point) 'part-side)
|
(not (or (get-text-property (point) 'part-side)
|
||||||
(get-text-property (point) 'block-side))))
|
(get-text-property (point) 'block-side))))
|
||||||
t))
|
t))
|
||||||
|
|
||||||
(sp-local-pair 'web-mode "<" nil :when '(sp-web-mode-is-code-context)))
|
(sp-local-pair 'web-mode "<" nil :when '(sp-web-mode-is-code-context)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue