Damson/assets/syntax/diff.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
6.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="Diff" version="9" kateversion="5.62" section="Other" extensions="*.diff;*patch;*.rej" mimetype="text/x-patch"><highlighting><contexts><context name="Normal" attribute="Normal Text" fallthroughContext="AttrNormal"><StringDetect String="@@" attribute="Header" context="AttrHeader_Chunk" beginRegion="chunk" column="0"/><AnyChar String="0123456789" attribute="Header" context="AttrHeader_Chunk" beginRegion="chunk" column="0"/><RegExpr String="^\*+$" attribute="Header" context="RChunk" beginRegion="chunk" column="0"/><RegExpr String="^Only in [^:]*:.*$" attribute="File" column="0"/><StringDetect String="diff" attribute="File" context="AttrFile_RFile" beginRegion="chunk" column="0"/><StringDetect String="====" attribute="File" context="AttrFile" column="0"/><StringDetect String="***" attribute="File" context="AttrFile_File" beginRegion="chunk" column="0"/><StringDetect String="---" attribute="File" context="AttrFile_File" beginRegion="chunk" column="0"/><IncludeRules context="FindDiff"/><DetectChar char="!" attribute="Changed line (old)" context="ChangedOld" column="0"/></context><context name="AttrNormal" attribute="Normal Text" lineEndContext="#pop"/><context name="FindDiff" attribute="Normal Text"><StringDetect String="---" attribute="File" context="AttrFile" column="0"/><StringDetect String="+++" attribute="Header" context="AttrHeader" column="0"/><AnyChar String="+>" attribute="Added line" context="Added" column="0"/><AnyChar String="-&lt;" attribute="Removed line" context="Removed" column="0"/></context><context name="ChangedOld" attribute="Changed line (old)" lineEndContext="#pop"/><context name="AttrFile" attribute="File" lineEndContext="#pop"/><context name="AttrFile_File" attribute="File" lineEndContext="#pop!File"/><context name="AttrHeader_Chunk" attribute="Header" lineEndContext="#pop!Chunk"/><context name="AttrHeader_ChunkInFile" attribute="Header" lineEndContext="#pop!ChunkInFile"/><context name="ChangedNew" attribute="Changed line (new)" lineEndContext="#pop"/><context name="Chunk" attribute="Normal Text" fallthroughContext="AttrNormal"><IncludeRules context="FindDiff"/><StringDetect String="@@" attribute="Header" context="#pop" endRegion="chunk" column="0" lookAhead="1"/><AnyChar String="0123456789" attribute="Header" context="#pop" endRegion="chunk" column="0" lookAhead="1"/><DetectChar char="!" attribute="Changed line (old)" context="ChangedOld" column="0"/></context><context name="ChunkInFile" attribute="Normal Text" fallthroughContext="AttrNormal"><IncludeRules context="FindDiff"/><StringDetect String="@@" attribute="Header" context="#pop" endRegion="chunk" column="0" lookAhead="1"/><AnyChar String="0123456789" attribute="Header" context="#pop" endRegion="chunk" column="0" lookAhead="1"/><StringDetect String="Index:" attribute="Normal Text" context="#pop!AttrNormal" endRegion="chunk" column="0"/><RegExpr String="^(====|\*\*\*|\-\-\-|diff|Only in [^:]*:).*$" attribute="File" context="#pop" endRegion="chunk" column="0" lookAhead="1"/><DetectChar char="!" attribute="Changed line (old)" context="ChangedOld" column="0"/></context><context name="File" attribute="Normal Text" fallthroughContext="AttrNormal"><IncludeRules context="FindDiff"/><StringDetect String="@@" attribute="Header" context="AttrHeader_ChunkInFile" beginRegion="chunk" column="0"/><AnyChar String="0123456789" attribute="Header" context="AttrHeader_ChunkInFile" beginRegion="chunk" column="0"/><RegExpr String="^\*+$" attribute="Header" context="RChunkInFile" beginRegion="chunk" column="0"/><RegExpr String="^(====|\*\*\*|\-\-\-|diff|Only in [^:]*:).*$" attribute="File" context="#pop" endRegion="chunk" column="0"/><DetectChar char="!" attribute="Changed line (old)" context="ChangedOld" column="0"/></context><context name="RChunkInFile" attribute="Normal Text" fallthroughContext="AttrNormal"><RegExpr String="^\*\*\* .* \*\*\*\*$" attribute="Header" column="0"/><RegExpr String="^\-\-\- .* \-\-\-\-$" attribute="Header" context="RChunkInFileNew" column="0"/><IncludeRules context="ChunkInFile"/></context><context name="Added" attribute="Added line" lineEndContext="#pop"/><context name="AttrFile_RFile" attribute="File" lineEndContext="#pop!RFile"/><context name="AttrHeader" attribute="Header" lineEndContext="#pop"/><context name="RChunk" attribute="Normal Text" fallthroughContext="AttrNormal"><RegExpr String="^\*\*\* .* \*\*\*\*$" attribute="Header" column="0"/><RegExpr String="^\-\-\- .* \-\-\-\-$" attribute="Header" context="RChunkNew" column="0"/><IncludeRules context="Chunk"/></context><context name="RChunkInFileNew" attribute="Normal Text" fallthroughContext="AttrNormal"><StringDetect String="@@" attribute="Header" context="#pop#pop" column="0" lookAhead="1"/><AnyChar String="0123456789" attribute="Header" context="#pop#pop" column="0" lookAhead="1"/><RegExpr String="^(====|\*\*\*|\-\-\-|diff|Only in [^:]*:).*$" attribute="File" context="#pop#pop" endRegion="chunk" column="0" lookAhead="1"/><DetectChar char="!" attribute="Changed line (new)" context="ChangedNew" column="0"/><IncludeRules context="FindDiff"/></context><context name="RChunkNew" attribute="Normal Text" fallthroughContext="AttrNormal"><StringDetect String="@@" attribute="Header" context="#pop#pop" column="0" lookAhead="1"/><AnyChar String="0123456789" attribute="Header" context="#pop#pop" column="0" lookAhead="1"/><DetectChar char="!" attribute="Changed line (new)" context="ChangedNew" column="0"/><IncludeRules context="FindDiff"/></context><context name="RFile" attribute="Normal Text" fallthroughContext="AttrNormal"><RegExpr String="^(diff|Only in [^:]*:)" attribute="File" context="#pop" endRegion="chunk" column="0" lookAhead="1"/><RegExpr String="^(====|\*\*\*|\-\-\-|diff|Only in [^:]*:).*$" attribute="Header" column="0"/><RegExpr String="^\*+$" attribute="Header" context="RChunkInFile" beginRegion="chunk" column="0"/><IncludeRules context="File"/></context><context name="Removed" attribute="Removed line" lineEndContext="#pop"/></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="0"/><itemData name="File" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="Header" defStyleNum="dsDataType" spellChecking="0"/><itemData name="Removed line" defStyleNum="dsString" spellChecking="0"/><itemData name="Added line" defStyleNum="dsVariable" spellChecking="0"/><itemData name="Changed line (old)" defStyleNum="dsString" spellChecking="0"/><itemData name="Changed line (new)" defStyleNum="dsVariable" spellChecking="0"/></itemDatas></highlighting></language>