We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bfe24d2 + 315cc59 commit 1c37249Copy full SHA for 1c37249
rust-mode.el
@@ -18,6 +18,7 @@
18
(require 'url-vars))
19
20
(defvar electric-pair-inhibit-predicate)
21
+(defvar electric-indent-chars)
22
23
;; for GNU Emacs < 24.3
24
(eval-when-compile
@@ -1299,6 +1300,11 @@ This is written mainly to be used as `end-of-defun-function' for Rust."
1299
1300
(setq-local comment-end "")
1301
(setq-local indent-tabs-mode nil)
1302
1303
+ ;; Auto indent on }
1304
+ (setq-local
1305
+ electric-indent-chars (cons ?} (and (boundp 'electric-indent-chars)
1306
+ electric-indent-chars)))
1307
+
1308
;; Allow paragraph fills for comments
1309
(setq-local comment-start-skip "\\(?://[/!]*\\|/\\*[*!]?\\)[[:space:]]*")
1310
(setq-local paragraph-start
0 commit comments