Damson/assets/syntax/textproto.xml
astar76 11c1a7808b Build the syntax definitions into the app
Highlighting relied on the syntax-highlighting package, so removing it
left every file uncoloured. The 462 definitions now live in assets/syntax
and are compressed into the binary at build time, unpacked per language
when used. User .xml files still add to or replace them, and the licence
each file declares is recorded in assets/syntax/LICENSES.md.

Also moves files to the trash without needing gio.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 20:35:27 -06:00

1 line
No EOL
5.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="TextProto" section="Other" version="3" kateversion="5.62" extensions="*.txtpb;*.textproto;*.textpb;*.pbtxt" author="Alexander Potashev ([email protected])" license="MIT"><highlighting><list name="Constants"><item>False</item><item>True</item><item>f</item><item>false</item><item>t</item><item>true</item></list><contexts><context name="Message" attribute="Style_Normal"><DetectSpaces attribute="Style_Normal"/><DetectChar char="#" attribute="Style_Comment" context="Comment"/><DetectChar char="," attribute="Style_Separator_Pair"/><DetectIdentifier attribute="Style_Key" context="Field_Key"/><DetectChar char="[" attribute="Style_Normal" context="Extension_Key" lookAhead="1"/><AnyChar String="}>" attribute="Style_Error"/></context><context name="Comment" attribute="Style_Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/><DetectIdentifier/></context><context name="Field_Key" attribute="Style_Normal"><DetectSpaces attribute="Style_Normal"/><DetectChar char=":" attribute="Style_Separator_Pair" context="#pop!Value"/><AnyChar String="{&lt;[" attribute="Style_Normal" context="#pop!Value" lookAhead="1"/></context><context name="Value" attribute="Style_Normal"><DetectSpaces attribute="Style_Normal"/><DetectChar char="#" attribute="Style_Comment" context="Comment"/><keyword String="Constants" attribute="Style_Keyword" context="#pop"/><DetectIdentifier attribute="Style_Identifier_Value" context="#pop"/><AnyChar String="-.0123456789" context="#pop!ScalarValue" lookAhead="1"/><DetectChar char='"' attribute="Style_String_Value" context="#pop!StringDQ_Value"/><DetectChar char="'" attribute="Style_String_Value" context="#pop!StringSQ_Value"/><DetectChar char="&lt;" attribute="Style_Separator_Pair" context="#pop!PairAngle" beginRegion="Region_Message_Angle"/><DetectChar char="{" attribute="Style_Separator_Pair" context="#pop!PairBrace" beginRegion="Region_Message_Brace"/><DetectChar char="[" attribute="Style_Separator_Array" context="#pop!Array" beginRegion="Region_Array"/><DetectChar char="," context="#pop" lookAhead="1"/></context><context name="EscapeString" attribute="Style_String_Value_Char" lineEndContext="#pop"><RegExpr String="\\([abfnrtv?\\'&#34;]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}|u[0-9a-fA-F]{4}|U000[0-9a-fA-F]{5}|U0010[0-9a-fA-F]{4})" attribute="Style_String_Value_Char" context="#pop"/><RegExpr String="\\([xX][0-9a-fA-F]?|u[0-9a-fA-F]{,3}|U(0(0(0[0-9a-fA-F]{,5}|1(0[0-9a-fA-F]{,4})?)?)?)?)?" attribute="Style_Error" context="#pop"/></context><context name="StringDQ_Value" attribute="Style_String_Value"><DetectChar char='"' attribute="Style_String_Value" context="#pop!String_Value_End"/><DetectChar char="\" context="EscapeString" lookAhead="1"/></context><context name="StringSQ_Value" attribute="Style_String_Value"><DetectChar char="'" attribute="Style_String_Value" context="#pop!String_Value_End"/><DetectChar char="\" context="EscapeString" lookAhead="1"/></context><context name="String_Value_End" attribute="Style_Normal" fallthroughContext="#pop"><DetectSpaces attribute="Style_Normal"/><DetectChar char="#" attribute="Style_Comment" context="Comment"/><DetectChar char='"' attribute="Style_String_Value" context="#pop!StringDQ_Value"/><DetectChar char="'" attribute="Style_String_Value" context="#pop!StringSQ_Value"/></context><context name="Array" attribute="Style_Normal" fallthroughContext="Value"><DetectSpaces attribute="Style_Normal"/><DetectChar char="#" attribute="Style_Comment" context="Comment"/><DetectChar char="," attribute="Style_Separator_Array"/><DetectChar char="]" attribute="Style_Separator_Array" context="#pop" endRegion="Region_Array"/></context><context name="Extension_Key" attribute="Style_Error"><RegExpr String="\[[a-zA-Z0-9._]+(/[a-zA-Z0-9._]+)?\]" attribute="Style_Extension_Type" context="#pop!Field_Key"/><RegExpr String="\[(\s+|[.\w]+)?" attribute="Style_Error" context="#pop!Field_Key"/></context><context name="PairAngle" attribute="Style_Normal"><DetectChar char=">" attribute="Style_Separator_Pair" context="#pop" endRegion="Region_Message_Angle"/><IncludeRules context="Message"/></context><context name="PairBrace" attribute="Style_Normal"><DetectChar char="}" attribute="Style_Separator_Pair" context="#pop" endRegion="Region_Message_Brace"/><IncludeRules context="Message"/></context><context name="ScalarValue" attribute="Style_Decimal"><RegExpr String="-?(0x[0-9a-fA-F]+|[0-9]*+\.?[0-9]*+([eE]?[-+]?[0-9]+)?[fF]?)" attribute="Style_Decimal" context="#pop"/></context></contexts><itemDatas><itemData name="Style_Normal" defStyleNum="dsNormal"/><itemData name="Style_Separator_Pair" defStyleNum="dsFunction" bold="1"/><itemData name="Style_Separator_Array" defStyleNum="dsOthers" bold="1"/><itemData name="Style_Decimal" defStyleNum="dsDecVal"/><itemData name="Style_Key" defStyleNum="dsVariable"/><itemData name="Style_Identifier_Value" defStyleNum="dsConstant"/><itemData name="Style_String_Value" defStyleNum="dsString"/><itemData name="Style_String_Value_Char" defStyleNum="dsChar"/><itemData name="Style_Keyword" defStyleNum="dsKeyword"/><itemData name="Style_Extension_Type" defStyleNum="dsDataType"/><itemData name="Style_Comment" defStyleNum="dsComment"/><itemData name="Style_Error" defStyleNum="dsError"/></itemDatas></highlighting></language>