Skip to content

Commit 70bc163

Browse files
committed
Multiline comments with leading *s line up the *s
1 parent 0b9dc80 commit 70bc163

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/etc/emacs/rust-mode.el

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@
5757
;; A closing brace is 1 level unindended
5858
((looking-at "}") (* rust-indent-offset (- level 1)))
5959

60+
; Doc comments in /** style with leading * indent to line up the *s
61+
((and (nth 4 (syntax-ppss)) (looking-at "*"))
62+
(+ 1 (* rust-indent-offset level)))
63+
6064
;; If we're in any other token-tree / sexp, then:
6165
;; - [ or ( means line up with the opening token
6266
;; - { means indent to either nesting-level * rust-indent-offset,

0 commit comments

Comments
 (0)