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

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="Elvish" version="1" kateversion="5.72" section="Scripts" extensions="*.elv" author="Lilith Houtjes ([email protected])" license="MIT"><highlighting><list name="keywords"><item>fn</item><item>pragma</item></list><list name="variables"><item>del</item><item>set</item><item>tmp</item><item>var</item></list><list name="controlFlow"><item>break</item><item>catch</item><item>continue</item><item>defer</item><item>elif</item><item>else</item><item>except</item><item>finally</item><item>for</item><item>if</item><item>return</item><item>try</item><item>while</item></list><list name="functions"><item>!=</item><item>!=s</item><item>%</item><item>*</item><item>+</item><item>-</item><item>-log</item><item>-randseed</item><item>/</item><item>&lt;</item><item>&lt;=</item><item>&lt;=s</item><item>&lt;s</item><item>==</item><item>==s</item><item>></item><item>>=</item><item>>=s</item><item>>s</item><item>all</item><item>assoc</item><item>base</item><item>benchmark</item><item>bool</item><item>call</item><item>cd</item><item>compact</item><item>compare</item><item>conj</item><item>constantly</item><item>count</item><item>deprecate</item><item>dissoc</item><item>drop</item><item>each</item><item>eawk</item><item>echo</item><item>eq</item><item>eval</item><item>exact-num</item><item>exec</item><item>exit</item><item>external</item><item>fail</item><item>float64</item><item>from-terminated</item><item>get-env</item><item>has-env</item><item>has-external</item><item>has-key</item><item>has-value</item><item>inexact-num</item><item>is</item><item>keys</item><item>kind-of</item><item>make-map</item><item>nop</item><item>not-eq</item><item>ns</item><item>num</item><item>one</item><item>order</item><item>peach</item><item>pprint</item><item>print</item><item>printf</item><item>put</item><item>randint</item><item>range</item><item>read-upto</item><item>repeat</item><item>repr</item><item>resolve</item><item>run-parallel</item><item>search-external</item><item>set-env</item><item>show</item><item>sleep</item><item>styled</item><item>styled-segment</item><item>take</item><item>tilde-abbr</item><item>time</item><item>to-lines</item><item>to-string</item><item>to-terminated</item><item>unset-env</item><item>use-mod</item><item>wcswidth</item></list><list name="functionsnoargs"><item>-gc</item><item>-ifaddrs</item><item>-stack</item><item>from-json</item><item>from-lines</item><item>only-bytes</item><item>only-values</item><item>rand</item><item>read-line</item><item>slurp</item><item>src</item><item>to-json</item></list><list name="booloperators"><item>and</item><item>coalesce</item><item>not</item></list><list name="docfunctions"><item>find</item><item>show</item><item>source</item></list><list name="editfunctions"><item>add-var</item><item>add-vars</item><item>binding-table</item><item>command-history</item><item>complete-filename</item><item>complete-getopt</item><item>complex-candidate</item><item>del-var</item><item>del-vars</item><item>insert-at-dot</item><item>key</item><item>listing:start-custom</item><item>match-prefix</item><item>match-subseq</item><item>match-substr</item><item>notify</item><item>redraw</item><item>replace-input</item><item>wordify</item></list><list name="editfunctionsnoargs"><item>-instant:start</item><item>apply-autofix</item><item>clear</item><item>close-mode</item><item>command:start</item><item>completion:close</item><item>completion:smart-start</item><item>completion:start</item><item>end-of-history</item><item>histlist:start</item><item>histlist:toggle-dedup</item><item>history:accept</item><item>history:down</item><item>history:down-or-quit</item><item>history:fast-forward</item><item>history:start</item><item>history:up</item><item>insert-last-word</item><item>insert-raw</item><item>kill-alnum-word-left</item><item>kill-alnum-word-right</item><item>kill-line-left</item><item>kill-line-right</item><item>kill-rune-left</item><item>kill-rune-right</item><item>kill-small-word-left</item><item>kill-small-word-right</item><item>kill-word-left</item><item>kill-word-right</item><item>lastcmd:start</item><item>listing:accept</item><item>listing:down</item><item>listing:down-cycle</item><item>listing:page-down</item><item>listing:page-up</item><item>listing:up</item><item>listing:up-cycle</item><item>move-dot-down</item><item>move-dot-eol</item><item>move-dot-left</item><item>move-dot-left-alnum-word</item><item>move-dot-left-small-word</item><item>move-dot-left-word</item><item>move-dot-right</item><item>move-dot-right-alnum-word</item><item>move-dot-right-small-word</item><item>move-dot-right-word</item><item>move-dot-sol</item><item>move-dot-up</item><item>navigation:insert-selected</item><item>navigation:insert-selected-and-quit</item><item>navigation:start</item><item>navigation:trigger-filter</item><item>navigation:trigger-shown-hidden</item><item>return-eof</item><item>return-line</item><item>smart-enter</item><item>toggle-quote-paste</item><item>tranpose-rune</item><item>tranpose-small-word</item><item>tranpose-word</item><item>transponse-alnum-word</item></list><list name="epmfunctions"><item>dest</item><item>install</item><item>is-installed</item><item>metadata</item><item>query</item><item>uninstall</item><item>upgrade</item></list><list name="epmfunctionsnoargs"><item>installed</item><item>list</item></list><list name="flagfunctions"><item>call</item><item>parse</item><item>parse-getopt</item></list><list name="filefunctions"><item>close</item><item>is-tty</item><item>open</item><item>truncate</item></list><list name="filefunctionsnoargs"><item>pipe</item></list><list name="mathfunctions"><item>abs</item><item>acos</item><item>acosh</item><item>asin</item><item>asinh</item><item>atan</item><item>atanh</item><item>ceil</item><item>cos</item><item>cosh</item><item>floor</item><item>is-inf</item><item>is-nan</item><item>log</item><item>log10</item><item>log2</item><item>max</item><item>min</item><item>pow</item><item>round</item><item>round-to-even</item><item>sin</item><item>sinh</item><item>sqrt</item><item>tan</item><item>tanh</item><item>trunc</item></list><list name="pathfunctions"><item>abs</item><item>base</item><item>clean</item><item>dir</item><item>eval-symlinks</item><item>ext</item><item>is-abs</item><item>is-dir</item><item>is-regular</item><item>join</item><item>temp-dir</item><item>temp-file</item></list><list name="platformfunctions"><item>hostname</item></list><list name="refunctions"><item>find</item><item>match</item><item>quote</item><item>replace</item><item>split</item></list><list name="storefunctions"><item>add-cmd</item><item>add-dir</item><item>cmd</item><item>cmds</item><item>del-cmd</item><item>del-dir</item></list><list name="storefunctionsnoargs"><item>dirs</item><item>next-cmd-seq</item></list><list name="stringfunctions"><item>compare</item><item>contains</item><item>contains-any</item><item>count</item><item>equal-fold</item><item>fields</item><item>from-codepoints</item><item>from-utf8-bytes</item><item>has-prefix</item><item>has-suffix</item><item>index</item><item>index-any</item><item>join</item><item>last-index</item><item>replace</item><item>split</item><item>title</item><item>to-codepoints</item><item>to-lower</item><item>to-title</item><item>to-upper</item><item>to-utf8-bytes</item><item>trim</item><item>trim-left</item><item>trim-prefix</item><item>trim-right</item><item>trim-space</item><item>trim-suffix</item></list><list name="unixcommands"><include>unixcommands##Bash</include></list><contexts><context name="normal" attribute="Normal Text"><DetectSpaces/><keyword String="keywords" attribute="Keyword"/><keyword String="controlFlow" attribute="Control Flow"/><keyword String="functions" attribute="Builtin"/><keyword String="functionsnoargs" attribute="Builtin"/><AnyChar String="&lt;>" attribute="Builtin" context="CompFunction"/><keyword String="unixcommands" attribute="Function"/><DetectChar char="{" attribute="Operator" context="TryVariable" beginRegion="Brace1" lookAhead="1"/><DetectChar char="}" attribute="Operator" endRegion="Brace1"/><keyword String="variables" attribute="Keyword" context="Variable" firstNonSpace="1"/><AnyChar String="{(|;" context="TryVariable" lookAhead="1"/><DetectChar char="$" attribute="Variable" context="Variable"/><AnyChar String="*?|&amp;;&lt;>()[]{}=" attribute="Operator"/><keyword String="booloperators" attribute="Operator"/><WordDetect String="use" attribute="Use"/><StringDetect String="builtin:" attribute="Builtin" context="BuiltinFunctions"/><StringDetect String="doc:" attribute="Builtin" context="DocFunctions"/><StringDetect String="edit:" attribute="Builtin" context="EditFunctions"/><StringDetect String="epm:" attribute="Builtin" context="EpmFunctions"/><StringDetect String="flag:" attribute="Builtin" context="FlagFunctions"/><StringDetect String="file:" attribute="Builtin" context="FileFunctions"/><StringDetect String="math:" attribute="Builtin" context="MathFunctions"/><StringDetect String="path:" attribute="Builtin" context="PathFunctions"/><StringDetect String="platform:" attribute="Builtin" context="PlatformFunctions"/><StringDetect String="re:" attribute="Builtin" context="RegexFunctions"/><StringDetect String="store:" attribute="Builtin" context="StoreFunctions"/><StringDetect String="str:" attribute="Builtin" context="StringFunctions"/><DetectChar char="#" attribute="Comment" context="Comment"/><HlCOct attribute="NumberBaseN"/><RegExpr String="\b0o[0-7]+|\b0b[01]+" attribute="NumberBaseN"/><HlCHex attribute="NumberBaseN"/><Float attribute="Float"/><Int attribute="Decimal"/><DetectChar char='"' attribute="String" context="StringDouble"/><DetectChar char="'" attribute="String" context="StringSingle"/><RegExpr String="([\p{L}_]+){1}(:){1}([a-zA-Z0-9!%+,-.\/:@\_~]+|\p{L}+){1}" context="TryExternal" lookAhead="1"/></context><context name="Variable" attribute="Variable" fallthroughContext="#pop" lineEndContext="#pop"><DetectSpaces/><RegExpr String="[a-zA-Z0-9!%+,-.\/:@\_~]+|\p{L}+" attribute="Variable" context="#pop"/></context><context name="TryVariable" attribute="Normal Text" fallthroughContext="#pop" lineEndContext="#pop"><DetectChar char="{" context="CurlyVariable" lookAhead="1"/><AnyChar String="{(|;" attribute="Operator"/><DetectSpaces/><keyword String="variables" attribute="Keyword" context="Variable"/></context><context name="BuiltinFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="functions" attribute="Builtin" context="#pop"/><keyword String="functionsnoargs" attribute="Builtin" context="#pop"/></context><context name="Comment" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/><DetectIdentifier/></context><context name="CompFunction" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><StringDetect String="=s" attribute="Builtin" context="#pop"/><AnyChar String="=s" attribute="Builtin" context="#pop"/></context><context name="CurlyVariable" attribute="Normal Text" fallthroughContext="#pop#pop" lineEndContext="#pop#pop"><StringDetect String="{ " attribute="Operator" context="#pop"/><StringDetect String="{&#9;" attribute="Operator" context="#pop"/><DetectChar char="{" attribute="Operator"/><DetectIdentifier context="#pop#pop"/></context><context name="DocFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="docfunctions" attribute="Builtin" context="#pop"/></context><context name="EditFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="editfunctions" attribute="Builtin" context="#pop"/><keyword String="editfunctionsnoargs" attribute="Builtin" context="#pop"/></context><context name="EpmFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="epmfunctions" attribute="Builtin" context="#pop"/><keyword String="epmfunctionsnoargs" attribute="Builtin" context="#pop"/></context><context name="FileFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="filefunctions" attribute="Builtin" context="#pop"/><keyword String="filefunctionsnoargs" attribute="Builtin" context="#pop"/></context><context name="FlagFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="flagfunctions" attribute="Builtin" context="#pop"/></context><context name="MathFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="mathfunctions" attribute="Builtin" context="#pop"/></context><context name="PathFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="pathfunctions" attribute="Builtin" context="#pop"/></context><context name="PlatformFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="platformfunctions" attribute="Builtin" context="#pop"/></context><context name="RegexFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="refunctions" attribute="Builtin" context="#pop"/></context><context name="StoreFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="storefunctions" attribute="Builtin" context="#pop"/><keyword String="storefunctionsnoargs" attribute="Builtin" context="#pop"/></context><context name="StringDouble" attribute="String" lineEndContext="#pop"><DetectChar char='"' attribute="String" context="#pop"/><HlCStringChar attribute="Keychar"/></context><context name="StringFunctions" attribute="Builtin" fallthroughContext="#pop" lineEndContext="#pop"><keyword String="stringfunctions" attribute="Builtin" context="#pop"/></context><context name="StringSingle" attribute="String" lineEndContext="#pop"><StringDetect String="''" attribute="String"/><DetectChar char="'" attribute="String" context="#pop"/><HlCStringChar attribute="Keychar"/></context><context name="TryExternal" attribute="Normal Text" fallthroughContext="#pop" lineEndContext="#pop"><StringDetect String="%1" attribute="Extension" dynamic="1"/><StringDetect String="%2" attribute="Operator" dynamic="1"/><StringDetect String="%3" attribute="Function" context="#pop" dynamic="1"/></context></contexts><itemDatas><itemData name="Builtin" defStyleNum="dsBuiltIn"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Control Flow" defStyleNum="dsControlFlow"/><itemData name="Decimal" defStyleNum="dsDecVal"/><itemData name="Extension" defStyleNum="dsExtension"/><itemData name="Float" defStyleNum="dsFloat"/><itemData name="Function" defStyleNum="dsFunction"/><itemData name="Keychar" defStyleNum="dsSpecialChar"/><itemData name="Keyword" defStyleNum="dsKeyword"/><itemData name="Normal Text" defStyleNum="dsNormal"/><itemData name="NumberBaseN" defStyleNum="dsBaseN"/><itemData name="Operator" defStyleNum="dsOperator"/><itemData name="String" defStyleNum="dsString"/><itemData name="Use" defStyleNum="dsImport"/><itemData name="Variable" defStyleNum="dsVariable"/></itemDatas></highlighting><general><keywords casesensitive="1" weakDeliminator="\+,-:=!.@#%^_`~" wordWrapDeliminator=" |&#9;|#.*?(?:[ ]|$)|^(?: | )| | "/><comments><comment name="singleLine" start="#"/></comments></general></language>