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

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="ConTeXt" version="12" section="Markup" kateversion="5.79" priority="9" extensions="*.ctx;*.mkiv;*.mkvi;*.mkxl;*.mklx" mimetype="text/x-tex" author="Philipp A. ([email protected])" license="GPL"><highlighting><list name="titles"><item>\chapter</item><item>\part</item><item>\section</item><item>\subject</item><item>\subsection</item><item>\subsubject</item><item>\subsubsection</item><item>\subsubsubject</item><item>\subsubsubsection</item><item>\subsubsubsubject</item><item>\subsubsubsubsection</item><item>\subsubsubsubsubject</item><item>\title</item></list><list name="mathMacros"><item>\formula</item><item>\m</item><item>\math</item><item>\mathematics</item></list><list name="startEnvironments"><item>\bTABLE</item><item>\bTABLEbody</item><item>\bTABLEfoot</item><item>\bTABLEhead</item><item>\bTABLEnext</item><item>\bTD</item><item>\bTR</item></list><list name="stopEnvironments"><item>\eTABLE</item><item>\eTABLEbody</item><item>\eTABLEfoot</item><item>\eTABLEhead</item><item>\eTABLEnext</item><item>\eTD</item><item>\eTR</item></list><list name="startMetaPost"><item>\startMP</item><item>\startMPcode</item><item>\startMPinclusions</item><item>\startMPpage</item><item>\startreusableMPgraphic</item><item>\startstaticMPfigure</item><item>\startuniqueMPgraphic</item><item>\startuseMPgraphic</item></list><list name="stopMetaPost"><item>\stopMP</item><item>\stopMPcode</item><item>\stopMPinclusions</item><item>\stopMPpage</item><item>\stopreusableMPgraphic</item><item>\stopstaticMPfigure</item><item>\stopuniqueMPgraphic</item><item>\stopuseMPgraphic</item></list><contexts><context name="Normal Text" attribute="Normal Text"><keyword String="titles" attribute="Section"/><StringDetect String="$$" attribute="Block" context="MathModeDisplay"/><DetectChar char="$" attribute="Block" context="MathMode"/><keyword String="mathMacros" attribute="Block" context="MathModeMacroFind"/><StringDetect String="\startformula" attribute="Block" context="MathModeFormula" beginRegion="mathModeBlock"/><StringDetect String="\starttyping" attribute="Block" context="Verbatim" beginRegion="typingBlock"/><StringDetect String="\startluacode" attribute="Block" context="LuaCode" beginRegion="luaBlock"/><StringDetect String="\startLUA" attribute="Block" context="LuaCode" beginRegion="luaBlock"/><StringDetect String="\startXML" attribute="Block" context="XmlCode" beginRegion="xmlBlock"/><keyword String="startMetaPost" attribute="Block" context="MetaPostCode" beginRegion="metaPostBlock"/><IncludeRules context="Common"/></context><context name="MathModeCommon" attribute="Error"><AnyChar String="^_" attribute="Brace"/><StringDetect String="\startformula" attribute="Error"/><StringDetect String="\text" attribute="Block" context="MathModeTextFind"/><IncludeRules context="Common"/></context><context name="Common" attribute="Error"><DetectChar char="%" attribute="Comment" context="Comment"/><RegExpr String="\\start(?:[a-zA-Z_]+)" attribute="Block" beginRegion="block"/><RegExpr String="\\stop(?:[a-zA-Z_]+)" attribute="Block" endRegion="block"/><keyword String="startEnvironments" attribute="Block" beginRegion="block"/><keyword String="stopEnvironments" attribute="Block" endRegion="block"/><RegExpr String="\\([[:alpha:]]+|[[:graph:]])" attribute="Macro"/><DetectChar char="{" attribute="Brace" beginRegion="block"/><DetectChar char="}" attribute="Brace" endRegion="block"/></context><context name="LuaCode" attribute="Normal Text"><StringDetect String="\stopluacode" attribute="Block" context="#pop" endRegion="luaBlock"/><StringDetect String="\stopLUA" attribute="Block" context="#pop" endRegion="luaBlock"/><IncludeRules context="##Lua"/></context><context name="MathModeMacro" attribute="Math"><DetectChar char="{" attribute="Brace" context="MathModeMacro"/><DetectChar char="}" attribute="Brace" context="#pop"/><DetectChar char="$" attribute="Error"/><StringDetect String="\stopformula" attribute="Error"/><IncludeRules context="MathModeCommon"/></context><context name="MathModeText" attribute="Normal Text"><DetectChar char="{" attribute="Brace" context="MathModeText"/><DetectChar char="}" attribute="Brace" context="#pop"/><IncludeRules context="Normal Text"/></context><context name="NestedVerbatim" attribute="Verbatim"><StringDetect String="\starttyping" attribute="Verbatim" context="NestedVerbatim"/><StringDetect String="\stoptyping" attribute="Verbatim" context="#pop"/></context><context name="Comment" attribute="Comment" lineEndContext="#pop"><IncludeRules context="##Comments"/></context><context name="MathMode" attribute="Math"><DetectChar char="$" attribute="Block" context="#pop"/><StringDetect String="\stopformula" attribute="Error"/><IncludeRules context="MathModeCommon"/></context><context name="MathModeDisplay" attribute="Math"><StringDetect String="$$" attribute="Block" context="#pop"/><DetectChar char="$" attribute="Error"/><StringDetect String="\stopformula" attribute="Error"/><IncludeRules context="MathModeCommon"/></context><context name="MathModeFormula" attribute="Math"><DetectChar char="$" attribute="Error"/><StringDetect String="\stopformula" attribute="Block" context="#pop" endRegion="mathModeBlock"/><IncludeRules context="MathModeCommon"/></context><context name="MathModeMacroFind" attribute="Math"><DetectChar char="{" attribute="Brace" context="#pop!MathModeMacro"/><RegExpr String="\\([[:alpha:]]+|[[:graph:]])" attribute="Macro" context="#pop"/><RegExpr String="[[:graph:]]" attribute="Math" context="#pop"/></context><context name="MathModeTextFind" attribute="Normal Text"><DetectChar char="{" attribute="Brace" context="#pop!MathModeText"/></context><context name="MetaPostCode" attribute="Normal Text"><keyword String="stopMetaPost" attribute="Block" context="#pop" endRegion="metaPostBlock"/><IncludeRules context="##Metapost/Metafont"/></context><context name="Verbatim" attribute="Verbatim"><StringDetect String="\starttyping" attribute="Verbatim" context="NestedVerbatim"/><StringDetect String="\stoptyping" attribute="Block" context="#pop" endRegion="typingBlock"/></context><context name="XmlCode" attribute="Normal Text"><StringDetect String="\stopXML" attribute="Block" context="#pop" endRegion="xmlBlock"/><IncludeRules context="##XML"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Section" defStyleNum="dsKeyword"/><itemData name="Brace" defStyleNum="dsChar" spellChecking="0"/><itemData name="Math" defStyleNum="dsOthers" spellChecking="0"/><itemData name="Macro" defStyleNum="dsFunction" spellChecking="0"/><itemData name="Block" defStyleNum="dsRegionMarker" spellChecking="0"/><itemData name="Error" defStyleNum="dsError" spellChecking="0"/><itemData name="Verbatim" defStyleNum="dsString" spellChecking="0"/></itemDatas></highlighting><general><keywords weakDeliminator="\" wordWrapDeliminator=",{}[]"/><comments><comment name="singleLine" start="%"/></comments><spellchecking><encodings><encoding string="''"/></encodings></spellchecking></general></language>