Skip to content

Commit 39b713f

Browse files
committed
kate: allow [] regions to be collapsed
1 parent c43512b commit 39b713f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/etc/kate/rust.xml

+4-2
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,21 @@
203203
<RegExpr String="0b[0-1_]+&rustIntSuf;" attribute="Number" context="#stay"/>
204204
<RegExpr String="[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?" attribute="Number" context="#stay"/>
205205
<RegExpr String="[0-9][0-9_]*&rustIntSuf;" attribute="Number" context="#stay"/>
206-
<Detect2Chars char="#" char1="[" attribute="Attribute" context="Attribute"/>
206+
<Detect2Chars char="#" char1="[" attribute="Attribute" context="Attribute" beginRegion="Attribute"/>
207207
<RegExpr String="&rustIdent;::" attribute="Scope"/>
208208
<RegExpr String="&rustIdent;!" attribute="Macro"/>
209209
<RegExpr String="&apos;&rustIdent;(?!&apos;)" attribute="Lifetime"/>
210210
<DetectChar char="{" attribute="Symbol" context="#stay" beginRegion="Brace" />
211211
<DetectChar char="}" attribute="Symbol" context="#stay" endRegion="Brace" />
212212
<DetectChar char="&quot;" attribute="String" context="String"/>
213213
<DetectChar char="&apos;" attribute="Character" context="Character"/>
214+
<DetectChar char="[" attribute="Symbol" context="#stay" beginRegion="Bracket" />
215+
<DetectChar char="]" attribute="Symbol" context="#stay" endRegion="Bracket" />
214216
<DetectIdentifier/>
215217
</context>
216218
<context attribute="Attribute" lineEndContext="#stay" name="Attribute">
219+
<DetectChar char="]" attribute="Attribute" context="#pop" endRegion="Attribute"/>
217220
<IncludeRules context="Normal"/>
218-
<DetectChar char="]" attribute="Attribute" context="#pop"/>
219221
</context>
220222
<context attribute="Definition" lineEndContext="#stay" name="Function">
221223
<DetectSpaces/>

0 commit comments

Comments
 (0)