about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/etc/kate/rust.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/etc/kate/rust.xml b/src/etc/kate/rust.xml
index 7bb4a769f94..97b7f66c54b 100644
--- a/src/etc/kate/rust.xml
+++ b/src/etc/kate/rust.xml
@@ -203,6 +203,7 @@
 			<RegExpr String="0b[0-1_]+&rustIntSuf;" attribute="Number" context="#stay"/>
 			<RegExpr String="[0-9][0-9_]*\.[0-9_]*([eE][+-]?[0-9_]+)?(f32|f64|f)?" attribute="Number" context="#stay"/>
 			<RegExpr String="[0-9][0-9_]*&rustIntSuf;" attribute="Number" context="#stay"/>
+			<Detect2Chars char="#" char1="[" attribute="Attribute" context="Attribute"/>
 			<RegExpr String="&rustIdent;::" attribute="Scope"/>
 			<RegExpr String="&rustIdent;!" attribute="Macro"/>
 			<RegExpr String="&apos;&rustIdent;(?!&apos;)" attribute="Lifetime"/>
@@ -212,6 +213,10 @@
 			<DetectChar char="&apos;" attribute="Character" context="Character"/>
 			<DetectIdentifier/>
 		</context>
+		<context attribute="Attribute" lineEndContext="#stay" name="Attribute">
+			<IncludeRules context="Normal"/>
+			<DetectChar char="]" attribute="Attribute" context="#pop"/>
+		</context>
 		<context attribute="Definition" lineEndContext="#stay" name="Function">
 			<DetectSpaces/>
 			<DetectChar char="(" attribute="Normal Text" context="#pop"/>
@@ -254,6 +259,7 @@
 		<itemData name="String Char"  defStyleNum="dsChar" color="#FF0000"/>
 		<itemData name="Character"    defStyleNum="dsChar" color="#FF0000"/>
 		<itemData name="Macro"        defStyleNum="dsOthers"/>
+		<itemData name="Attribute"    defStyleNum="dsOthers"/>
 		<itemData name="Lifetime"     defStyleNum="dsOthers" bold="1"/>
 	</itemDatas>
 </highlighting>