Damson/assets/syntax/kdl.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
7.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="KDL" section="Markup" version="1" kateversion="5.79" extensions="*.kdl" mimetype="text/x-kdl" license="MIT"><highlighting><contexts><context name="Document" attribute="Normal Text"><IncludeRules context="Node Start"/></context><context name="Node" attribute="Normal Text" lineEndContext="#pop"><DetectSpaces/><StringDetect String="//" attribute="Comment" context="Node End Comment"/><StringDetect String="/*" attribute="Comment" context="Block Comment" beginRegion="Comment"/><StringDetect String="/-" attribute="Comment"/><RegExpr String="\\(?=\s*(?://.*)?$)" attribute="Operator" context="Continued Node"/><DetectChar char=";" attribute="Operator" context="#pop"/><DetectChar char="}" context="#pop" lookAhead="1"/><DetectChar char="{" attribute="Operator" context="Children" beginRegion="Children"/><DetectChar char="(" attribute="Type Annotation" context="Type Annotation"/><RegExpr String='(?:[^\s(){}\[\]/\"#;=]+|"(?:\\(?:["\\bfnrst]|u\{[0-9A-Fa-f]{1,6}\})|[^"\\])*")(?=\s*=)' attribute="Property"/><DetectChar char="=" attribute="Operator"/><IncludeRules context="Value"/></context><context name="Block Comment" attribute="Comment"><StringDetect String="/*" attribute="Comment" context="Block Comment" beginRegion="Comment"/><StringDetect String="*/" attribute="Comment" context="#pop" endRegion="Comment"/><IncludeRules context="##Comments"/></context><context name="Node Start" attribute="Normal Text"><DetectSpaces/><StringDetect String="//" attribute="Comment" context="Line Comment"/><StringDetect String="/*" attribute="Comment" context="Block Comment" beginRegion="Comment"/><StringDetect String="/-" attribute="Comment"/><DetectChar char="(" attribute="Type Annotation" context="Node Annotation"/><RegExpr String='[^\s(){}\[\]/\"#;=]+' attribute="Node" context="Node"/><RegExpr String='(#+)"""' attribute="Node" context="Node Raw Multiline String" beginRegion="Multiline String"/><RegExpr String='(#+)"' attribute="Node" context="Node Raw String"/><StringDetect String='"""' attribute="Node" context="Node Multiline String" beginRegion="Multiline String"/><DetectChar char='"' attribute="Node" context="Node String"/><DetectChar char=";" attribute="Operator"/></context><context name="Children" attribute="Normal Text"><DetectChar char="}" attribute="Operator" context="#pop" endRegion="Children"/><IncludeRules context="Node Start"/></context><context name="Continued Comment" attribute="Comment" lineEndContext="#pop"><IncludeRules context="##Comments"/></context><context name="Continued Node" attribute="Normal Text" fallthroughContext="#pop"><DetectSpaces/><StringDetect String="//" attribute="Comment" context="Continued Comment"/></context><context name="Escaped String Newline" attribute="String" lineEndContext="#pop"/><context name="Line Comment" attribute="Comment" lineEndContext="#pop"><IncludeRules context="##Comments"/></context><context name="Multiline String" attribute="String"><StringDetect String='"""' attribute="String" context="#pop" endRegion="Multiline String"/><RegExpr String='\\(?:["\\bfnrst]|u\{[0-9A-Fa-f]{1,6}\})' attribute="Special Character"/><RegExpr String="\\(?:u\{[^}]*\}|.)?" attribute="Error"/></context><context name="Node Annotation" attribute="Type Annotation"><DetectChar char=")" attribute="Type Annotation" context="#pop"/></context><context name="Node End Comment" attribute="Comment" lineEndContext="#pop#pop"><IncludeRules context="##Comments"/></context><context name="Node Escaped String Newline" attribute="Node" lineEndContext="#pop"/><context name="Node Multiline String" attribute="Node"><StringDetect String='"""' attribute="Node" context="#pop!Node" endRegion="Multiline String"/><RegExpr String='\\(?:["\\bfnrst]|u\{[0-9A-Fa-f]{1,6}\})' attribute="Special Character"/></context><context name="Node Raw Multiline String" attribute="Node"><StringDetect String='"""%1' attribute="Node" context="#pop!Node" endRegion="Multiline String" dynamic="1"/></context><context name="Node Raw String" attribute="Node" lineEndContext="#pop!Node"><StringDetect String='"%1' attribute="Node" context="#pop!Node" dynamic="1"/></context><context name="Node String" attribute="Node" lineEndContext="#pop!Node"><RegExpr String="\\[\t ]*$" attribute="Special Character" context="Node Escaped String Newline"/><RegExpr String='\\(?:["\\bfnrst]|u\{[0-9A-Fa-f]{1,6}\})' attribute="Special Character"/><DetectChar char='"' attribute="Node" context="#pop!Node"/></context><context name="Raw Multiline String" attribute="Raw String"><StringDetect String='"""%1' attribute="Raw String" context="#pop" endRegion="Multiline String" dynamic="1"/></context><context name="Raw String" attribute="Raw String" lineEndContext="#pop"><StringDetect String='"%1' attribute="Raw String" context="#pop" dynamic="1"/></context><context name="String" attribute="String" lineEndContext="#pop"><RegExpr String="\\[\t ]*$" attribute="Special Character" context="Escaped String Newline"/><RegExpr String='\\(?:["\\bfnrst]|u\{[0-9A-Fa-f]{1,6}\})' attribute="Special Character"/><RegExpr String="\\(?:u\{[^}]*\}|.)?" attribute="Error"/><DetectChar char='"' attribute="String" context="#pop"/></context><context name="Type Annotation" attribute="Type Annotation"><DetectChar char=")" attribute="Type Annotation" context="#pop"/></context><context name="Value" attribute="Normal Text"><RegExpr String="(?:#(?:true|false|null|inf|-inf|nan)|\b(?:true|false|null))\b" attribute="Constant"/><RegExpr String="[+-]?[0-9](?:[0-9_]*[0-9_])?(?:\.[0-9](?:[0-9_]*[0-9_])?(?:[eE][+-]?[0-9](?:[0-9_]*[0-9_])?)?|[eE][+-]?[0-9](?:[0-9_]*[0-9_])?)(?=$|[\s;{}])" attribute="Float"/><RegExpr String="[+-]?0(?:[xX][0-9A-Fa-f][0-9A-Fa-f_]*|[oO][0-7][0-7_]*|[bB][01][01_]*)(?=$|[\s;{}])" attribute="Base-N Integer"/><RegExpr String="[+-]?[0-9](?:[0-9_]*[0-9_])?(?=$|[\s;{}])" attribute="Decimal"/><RegExpr String='(#+)"""' attribute="Raw String" context="Raw Multiline String" beginRegion="Multiline String"/><RegExpr String='(#+)"' attribute="Raw String" context="Raw String"/><StringDetect String='"""' attribute="String" context="Multiline String" beginRegion="Multiline String"/><DetectChar char='"' attribute="String" context="String"/><RegExpr String='[^\s(){}\[\]/\"#;=]+' attribute="String"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Node" defStyleNum="dsFunction" spellChecking="0"/><itemData name="Property" defStyleNum="dsVariable" spellChecking="0"/><itemData name="Type Annotation" defStyleNum="dsAttribute" spellChecking="0"/><itemData name="String" defStyleNum="dsString"/><itemData name="Raw String" defStyleNum="dsVerbatimString"/><itemData name="Special Character" defStyleNum="dsSpecialChar" spellChecking="0"/><itemData name="Constant" defStyleNum="dsConstant" spellChecking="0"/><itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="0"/><itemData name="Base-N Integer" defStyleNum="dsBaseN" spellChecking="0"/><itemData name="Float" defStyleNum="dsFloat" spellChecking="0"/><itemData name="Operator" defStyleNum="dsOperator" spellChecking="0"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Error" defStyleNum="dsError" spellChecking="0"/></itemDatas></highlighting><general><comments><comment name="singleLine" start="//" position="afterwhitespace"/><comment name="multiLine" start="/*" end="*/" region="Comment"/></comments></general></language>