]> git.eshelyaron.com Git - emacs.git/commitdiff
(rust-ts-mode): Set electric-indent-chars
authorChristophe TROESTLER <Christophe.TROESTLER@umons.ac.be>
Fri, 8 Dec 2023 19:39:31 +0000 (21:39 +0200)
committerDmitry Gutov <dmitry@gutov.dev>
Fri, 8 Dec 2023 19:39:31 +0000 (21:39 +0200)
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode):
Set electric-indent-chars (bug#67701).

lisp/progmodes/rust-ts-mode.el

index 8127aa956f4b0bf1b509610b81749eb90fe093c3..cc803f5f91a4dfcd1a8570be202736a108f19b57 100644 (file)
@@ -435,6 +435,10 @@ delimiters < and >'s."
     (setq-local indent-tabs-mode nil
                 treesit-simple-indent-rules rust-ts-mode--indent-rules)
 
+    ;; Electric
+    (setq-local electric-indent-chars
+                (append "{}():;,#" electric-indent-chars))
+
     ;; Navigation.
     (setq-local treesit-defun-type-regexp
                 (regexp-opt '("enum_item"