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

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="Jsonnet" version="1" kateversion="5.62" section="Configuration" extensions="*.jsonnet;*.libsonnet" license="MIT" author="Ribhav Kaul"><highlighting><list name="stdlib"><item>abs</item><item>acos</item><item>asin</item><item>atan</item><item>ceil</item><item>cos</item><item>exp</item><item>exponent</item><item>extVar</item><item>floor</item><item>join</item><item>length</item><item>log</item><item>mantissa</item><item>max</item><item>min</item><item>pow</item><item>round</item><item>sign</item><item>sin</item><item>sqrt</item><item>tan</item><item>type</item></list><list name="keywords"><item>error</item><item>import</item><item>local</item><item>self</item><item>std</item></list><list name="control flow"><item>else</item><item>if</item><item>then</item></list><contexts><context name="Normal" attribute="Normal Text"><DetectSpaces/><DetectChar char="." attribute="Symbol" context="Dot" lookAhead="1"/><DetectChar char="{" attribute="Symbol" beginRegion="Brace1"/><DetectChar char="}" attribute="Symbol" endRegion="Brace1"/><DetectChar char="[" attribute="Symbol" beginRegion="Brace2"/><DetectChar char="]" attribute="Symbol" endRegion="Brace2"/><DetectChar char="(" attribute="Symbol" context="InFunctionCall"/><DetectChar char="#" attribute="Comment" context="Hash comment"/><StringDetect String="//" attribute="Comment" context="Commentar 1"/><StringDetect String="/*" attribute="Comment" context="Commentar 2" beginRegion="Comment"/><AnyChar String="[]&amp;+,-/*&lt;=>;!%?:~^" attribute="Symbol"/><AnyChar String="0123456789" context="Number" lookAhead="1"/><DetectChar char='"' attribute="String" context="String" beginRegion="Double Quote Region"/><DetectChar char="'" attribute="String" context="Single Quote Strings" beginRegion="Single Quote Region"/><StringDetect String="|||" attribute="String" context="Triple Pipe Strings" beginRegion="Triple Pipe Region"/><keyword String="keywords" attribute="Keyword"/><keyword String="control flow" attribute="Control Flow"/><keyword String="stdlib" attribute="Stdlib"/><RegExpr String="\b[_a-zA-Z]\w*(?=[\s]*(/\*\s*\d+\s*\*/\s*)?[(])" attribute="Function"/><DetectIdentifier attribute="Normal Text"/></context><context name="FindFloat" attribute="Normal Text"><RegExpr String="(\b(?:[0-9]++(_++[0-9]++)*+)(\.(((?:[0-9]++(_++[0-9]++)*+)(?:[eE][-+]?(?:[0-9]++(_++[0-9]++)*+))?+|(?:[eE][-+]?(?:[0-9]++(_++[0-9]++)*+)))[fFdD]?\b|[fFdD]\b)?|(?:[eE][-+]?(?:[0-9]++(_++[0-9]++)*+))[fFdD]?\b|[fFdD]\b)|\.(?:[0-9]++(_++[0-9]++)*+)(?:[eE][-+]?(?:[0-9]++(_++[0-9]++)*+))?[fFdD]?\b)" attribute="Float" context="#pop"/></context><context name="StringEscapedChar" attribute="String" lineEndContext="#pop"><HlCStringChar attribute="String Char" context="#pop"/><RegExpr String="\\u+[0-9a-fA-F]{4}" attribute="String Char" context="#pop"/><RegExpr String="\\(u+[0-9a-fA-F]*|.)?" attribute="Error" context="#pop"/></context><context name="Commentar 1" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/></context><context name="Commentar 2" attribute="Comment"><StringDetect String="*/" attribute="Comment" context="#pop" endRegion="Comment"/><DetectSpaces/><IncludeRules context="##Comments"/></context><context name="Dot" attribute="Normal Text"><IncludeRules context="FindFloat"/><DetectChar char="." attribute="Symbol" context="#pop!Member"/></context><context name="Hash comment" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/><DetectIdentifier/></context><context name="InFunctionCall" attribute="Normal Text"><IncludeRules context="Normal"/><DetectChar char=")" attribute="Symbol" context="#pop"/></context><context name="Member" attribute="Normal Text" fallthroughContext="#pop"><DetectSpaces attribute="Normal Text"/><DetectIdentifier attribute="Function" context="#pop"/></context><context name="Number" attribute="Normal Text"><IncludeRules context="FindFloat"/><RegExpr String="\b(0|[1-9][0-9]*+(_++[0-9_]++)*+)[lL]?\b" attribute="Decimal" context="#pop"/><AnyChar String="0123456789" attribute="Error" context="#pop"/></context><context name="Single Quote Strings" attribute="String"><DetectChar char="\" context="StringEscapedChar" lookAhead="1"/><DetectChar char="'" attribute="String" context="#pop" endRegion="Single Quote Region"/></context><context name="String" attribute="String"><DetectChar char="\" context="StringEscapedChar" lookAhead="1"/><DetectChar char='"' attribute="String" context="#pop" endRegion="Double Quote Region"/></context><context name="Triple Pipe Strings" attribute="String"><StringDetect String="|||" attribute="String" context="#pop" endRegion="Triple Pipe Region"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="0"/><itemData name="Function" defStyleNum="dsFunction" spellChecking="0"/><itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="0"/><itemData name="Float" defStyleNum="dsFloat" spellChecking="0"/><itemData name="String" defStyleNum="dsString"/><itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="0"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Symbol" defStyleNum="dsOperator" spellChecking="0"/><itemData name="Stdlib" defStyleNum="dsBuiltIn" spellChecking="0"/><itemData name="Error" defStyleNum="dsError" spellChecking="0"/></itemDatas></highlighting><general><keywords casesensitive="1"/></general></language>