Hello, Ok, updated kdelibs3. It will be available soon. After the update in May 19 2020, syntax rule files used by kdelibs3 is the exact same files provided by tdelibs (as shown in OBS, https://build.opensuse.org/package/show/KDE:KDE3/kdelibs3 -> tdelibs-kate-data.git-**.tar.bz2). Therefore, the attached patch can be used as-is on the tdelibs side. Thanks, On Wed, 11 Sep 2024 11:15:02 -0500 "David C. Rankin" <drankinatty@gmail.com> wrote:
On 9/11/24 1:28 AM, David C. Rankin wrote:
Yasuhiko,
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>
Can that be applied to the system wide rust.xml in /opt/kde3/share/apps/katepart/syntax/rust.xml so that it is available?
Also,
When you have time to apply the patch, can you post the link for the patch in the openSUSE build so TDE can reference it. Thank you!
-- David C. Rankin, J.D.,P.E.
-- Yasuhiko Kamata E-mail: belphegor@belbel.or.jp