branch: elpa/typescript-mode
commit 4832652496c2f10db083c2026183b4e4053084d3
Author: Louis-Dominique Dubeau <[email protected]>
Commit: Louis-Dominique Dubeau <[email protected]>

    Support electric-layout-mode.
    
    We've just added electric-indent-chars. Might as well support
    electric-layout-mode too.
---
 typescript-mode.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/typescript-mode.el b/typescript-mode.el
index b4632ba0dd..1a0dcb5411 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -2830,6 +2830,8 @@ Key bindings:
 
   (setq-local electric-indent-chars
              (append "{}():;," electric-indent-chars))
+  (setq-local electric-layout-rules
+             '((?\; . after) (?\{ . after) (?\} . before)))
 
   (let ((c-buffer-is-cc-mode t))
     ;; FIXME: These are normally set by `c-basic-common-init'.  Should

Reply via email to