]> git.lizzy.rs Git - rust.git/commitdiff
etc: attempts at fixing editor highlighting for new attribute syntax
authorCorey Richardson <corey@octayn.net>
Sun, 30 Mar 2014 12:34:32 +0000 (08:34 -0400)
committerCorey Richardson <corey@octayn.net>
Fri, 4 Apr 2014 04:53:23 +0000 (00:53 -0400)
src/etc/emacs/rust-mode.el
src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang
src/etc/kate/rust.xml

index 5cee600c2c019b9bb8c7cccdb24ca7990a82a9f6..26bdf7d7fba6741840fd745db698366014c6de28 100644 (file)
                        ;; but the "else" or "{" should align with the beginning
                        ;; of the expression it's in.)
                        (looking-at "\\<else\\>\\|{")
-                       
+
                        (save-excursion
                          (rust-rewind-irrelevant)
                          ;; Point is now at the end of the previous ine
index b9b0aa55a863caee17deece1df8cb6cc7e8d65fd..7ffa35b94e49118d37f090d86f21a406ba292526 100644 (file)
     </context>
 
     <context id="attribute" style-ref="attribute" class="attribute">
-      <start extended="true">\#\[</start>
+      <start extended="true">\#!?\[</start>
       <end>\]</end>
       <include>
         <context ref="def:in-comment"/>
index 98d870adf03e396acfd6117aa284a9493040770f..7fc44ebad2955ed5143f18e9e5ec0dea3841a23d 100644 (file)
                        <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" beginRegion="Attribute"/>
+                       <Detect2Chars char="#" char1="!" char2="[" attribute="Attribute" context="Attribute" beginRegion="Attribute"/>
                        <RegExpr String="&rustIdent;::" attribute="Scope"/>
                        <RegExpr String="&rustIdent;!" attribute="Macro"/>
                        <RegExpr String="&apos;&rustIdent;(?!&apos;)" attribute="Lifetime"/>