We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20def31 commit 0b9dc80Copy full SHA for 0b9dc80
src/etc/emacs/rust-mode.el
@@ -68,7 +68,13 @@
68
(let ((pt (point)))
69
(rust-rewind-irrelevant)
70
(backward-up-list)
71
- (if (looking-at "[[(]")
+ (if (and
72
+ (looking-at "[[(]")
73
+ ; We don't want to indent out to the open bracket if the
74
+ ; open bracket ends the line
75
+ (save-excursion
76
+ (forward-char)
77
+ (not (looking-at "[[:space:]]*\\(?://.*\\)?$"))))
78
(+ 1 (current-column))
79
(progn
80
(goto-char pt)
@@ -80,7 +86,7 @@
86
(beginning-of-line)
81
87
82
88
(end-of-line)
83
- (if (looking-back "[,;{}][[:space:]]*\\(?://.*\\)?")
89
+ (if (looking-back "[,;{}(][[:space:]]*\\(?://.*\\)?")
84
90
(* rust-indent-offset level)
85
91
(back-to-indentation)
92
(if (looking-at "#")
0 commit comments