Skip to content

Commit b6d5daf

Browse files
committed
etc: attempts at fixing editor highlighting for new attribute syntax
1 parent 2eccb1d commit b6d5daf

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/etc/emacs/rust-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
;; but the "else" or "{" should align with the beginning
123123
;; of the expression it's in.)
124124
(looking-at "\\<else\\>\\|{")
125-
125+
126126
(save-excursion
127127
(rust-rewind-irrelevant)
128128
;; Point is now at the end of the previous ine

src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@
282282
</context>
283283

284284
<context id="attribute" style-ref="attribute" class="attribute">
285-
<start extended="true">\#\[</start>
285+
<start extended="true">\#!?\[</start>
286286
<end>\]</end>
287287
<include>
288288
<context ref="def:in-comment"/>

src/etc/kate/rust.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@
202202
<RegExpr String="[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?" attribute="Number" context="#stay"/>
203203
<RegExpr String="[0-9][0-9_]*&rustIntSuf;" attribute="Number" context="#stay"/>
204204
<Detect2Chars char="#" char1="[" attribute="Attribute" context="Attribute" beginRegion="Attribute"/>
205+
<Detect2Chars char="#" char1="!" char2="[" attribute="Attribute" context="Attribute" beginRegion="Attribute"/>
205206
<RegExpr String="&rustIdent;::" attribute="Scope"/>
206207
<RegExpr String="&rustIdent;!" attribute="Macro"/>
207208
<RegExpr String="&apos;&rustIdent;(?!&apos;)" attribute="Lifetime"/>

0 commit comments

Comments
 (0)