Patch - katepart/syntax/rust.xml to include alerts (TODO, FIXME, etc...) in comments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



TDE devs,

I passed this along to Yasuhiko for openSUSE kde3, it may also be something that TDE wants to patch as well:

========== original message ============

The current rust.xml katepart syntax file does not highlight alerts like TODO, FIXME, etc. in the comments. The katepart/syntax file needs to be updated to include the katepart/syntax/alerts.xml file.

  A patch to do so is:

diff -ruNb a/syntax/rust.xml b/syntax/rust.xml
--- a/syntax/rust.xml   2015-10-28 15:38:53.000000000 -0500
+++ b/syntax/rust.xml   2024-09-10 08:53:59.108745900 -0500
@@ -323,10 +323,14 @@
<RegExpr String="U[0-9a-fA-F]{8}" attribute="CharEscape" context="#pop"/>
                        <RegExpr String="." attribute="Error" context="#pop"/>
                </context>
- <context attribute="Comment" lineEndContext="#pop" name="Commentar 1"/> + <context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
+                        <LineContinue attribute="Comment" context="#stay"/>
+                        <IncludeRules context="##Alerts" />
+                </context>
<context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
                        <DetectSpaces/>
<Detect2Chars char="*" char1="/" attribute="Comment" context="#pop" endRegion="Comment"/>
+                        <IncludeRules context="##Alerts" />
                </context>
        </contexts>
        <itemDatas>
@@ -348,6 +352,7 @@
                <itemData name="Macro"        defStyleNum="dsOthers"/>
                <itemData name="Attribute"    defStyleNum="dsOthers"/>
                <itemData name="Lifetime"     defStyleNum="dsOthers" bold="1"/>
+ <itemData name="Alert" defStyleNum="dsAlert" spellChecking="false"/>
                <itemData name="Error"        defStyleNum="dsError"/>
        </itemDatas>
 </highlighting>


--
David C. Rankin, J.D.,P.E.

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

____________________________________________________
tde-devels mailing list -- devels@xxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devels-leave@xxxxxxxxxxxxxxxxxx
Web mail archive available at https://mail.trinitydesktop.org/mailman3/hyperkitty/list/devels@xxxxxxxxxxxxxxxxxx

[Index of Archives]     [Trinity Users]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [KDE]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]     [Trinity Desktop Environment]

  Powered by Linux