Add dark theme and clean up Fortran95 syntax files

Added a new Fortran95.xshd syntax definition for the dark theme. Cleaned up the light theme Fortran95.xshd by removing duplicate keywords, updating digit color, and fixing delimiter escaping.
This commit is contained in:
ema
2026-01-12 22:27:51 +08:00
parent a4709caf1c
commit 8fb418b5ed
2 changed files with 425 additions and 15 deletions

View File

@@ -0,0 +1,423 @@
<?xml version="1.0" encoding="utf-8"?>
<SyntaxDefinition name="Fortran 95" extensions=".f90;.f95;.f03">
<Environment>
<Default color="#FFC8C8C8" bgcolor="#FF1E1E1E"/>
<Selection color="#FFC8C8C8" bgcolor="#FF264F78"/>
<LineNumbers color="#FF808080" bgcolor="#FF1E1E1E"/>
<CaretMarker color="#FFF0F0F1"/>
<VRuler color="#FF2A2A2A"/>
<FoldLine color="#FFA0A0A0" bgcolor="#FF1E1E1E"/>
<FoldMarker color="#FFC8C8C8" bgcolor="#FF1E1E1E"/>
<SelectedFoldLine color="#FFC8C8C8" bgcolor="#FF1E1E1E"/>
<EOLMarkers color="#FF3A3A3A"/>
<SpaceMarkers color="#FF3A3A3A"/>
<TabMarkers color="#FF3A3A3A"/>
<InvalidLines color="#FF3A3A3A"/>
</Environment>
<Properties>
<Property name="LineComment" value="!"/>
</Properties>
<Digits name="Digits" bold="false" italic="false" color="#FFB5CEA8"/>
<RuleSets>
<RuleSet ignorecase="true">
<Delimiters>&amp;&lt;&gt;~!%^*()-+=|\#/{}[]:;\"' , ?</Delimiters>
<Span name="LineComment" stopateol="true" color="#FF6A9955" bold="false" italic="false">
<Begin>!</Begin>
</Span>
<Span name="String" stopateol="true" noescapesequences="true" color="#FFD69D85" bold="false" italic="false">
<Begin>"</Begin>
<End>"</End>
</Span>
<Span name="Char" stopateol="true" noescapesequences="true" color="#FFD69D85" bold="false" italic="false">
<Begin>&apos;</Begin>
<End>&apos;</End>
</Span>
<KeyWords name="Keywords1" color="#FF569CD6" bold="false" italic="false">
<Key word=".and."/>
<Key word=".eq."/>
<Key word=".eqv."/>
<Key word=".false."/>
<Key word=".ge."/>
<Key word=".gt."/>
<Key word=".le."/>
<Key word=".lt."/>
<Key word=".ne."/>
<Key word=".neqv."/>
<Key word=".not."/>
<Key word=".or."/>
<Key word=".true."/>
<Key word=".xor."/>
<Key word="abs"/>
<Key word="abstract"/>
<Key word="access"/>
<Key word="achar"/>
<Key word="acos"/>
<Key word="action"/>
<Key word="adjustl"/>
<Key word="adjustr"/>
<Key word="advance"/>
<Key word="aimag"/>
<Key word="aint"/>
<Key word="algama"/>
<Key word="all"/>
<Key word="allocatable"/>
<Key word="allocate"/>
<Key word="allocated"/>
<Key word="alog"/>
<Key word="alog10"/>
<Key word="amax0"/>
<Key word="amax1"/>
<Key word="amin0"/>
<Key word="amin1"/>
<Key word="amod"/>
<Key word="anint"/>
<Key word="any"/>
<Key word="asin"/>
<Key word="assign"/>
<Key word="assignment"/>
<Key word="associated"/>
<Key word="atan"/>
<Key word="atan2"/>
<Key word="backspace"/>
<Key word="bit_size"/>
<Key word="blank"/>
<Key word="block"/>
<Key word="btest"/>
<Key word="byte"/>
<Key word="cabs"/>
<Key word="call"/>
<Key word="case"/>
<Key word="char"/>
<Key word="character"/>
<Key word="class"/>
<Key word="close"/>
<Key word="command_argument_count"/>
<Key word="common"/>
<Key word="complex"/>
<Key word="conjg"/>
<Key word="contains"/>
<Key word="continue"/>
<Key word="cos"/>
<Key word="cosh"/>
<Key word="count"/>
<Key word="cycle"/>
<Key word="dabs"/>
<Key word="dacos"/>
<Key word="dasin"/>
<Key word="data"/>
<Key word="datan"/>
<Key word="datan2"/>
<Key word="date_and_time"/>
<Key word="dble"/>
<Key word="dcmplx"/>
<Key word="dconjg"/>
<Key word="dcos"/>
<Key word="dcosh"/>
<Key word="ddim"/>
<Key word="deallocate"/>
<Key word="default"/>
<Key word="delim"/>
<Key word="derf"/>
<Key word="derfc"/>
<Key word="dexp"/>
<Key word="dfloat"/>
<Key word="dgamma"/>
<Key word="digits"/>
<Key word="dim"/>
<Key word="dimag"/>
<Key word="dimension"/>
<Key word="dint"/>
<Key word="direct"/>
<Key word="dlgama"/>
<Key word="dlog"/>
<Key word="dlog10"/>
<Key word="dmax1"/>
<Key word="dmin1"/>
<Key word="dmod"/>
<Key word="dnint"/>
<Key word="do"/>
<Key word="dot_product"/>
<Key word="double complex"/>
<Key word="double precision"/>
<Key word="dprod"/>
<Key word="dsign"/>
<Key word="dsin"/>
<Key word="dsinh"/>
<Key word="dsqrt"/>
<Key word="dtan"/>
<Key word="dtanh"/>
<Key word="elemental"/>
<Key word="else"/>
<Key word="elseif"/>
<Key word="elsewhere"/>
<Key word="end"/>
<Key word="enddo"/>
<Key word="endfile"/>
<Key word="endif"/>
<Key word="endselect"/>
<Key word="entry"/>
<Key word="eor"/>
<Key word="eoshift"/>
<Key word="epsilon"/>
<Key word="equivalence"/>
<Key word="erf"/>
<Key word="erfc"/>
<Key word="err"/>
<Key word="exist"/>
<Key word="exit"/>
<Key word="exp"/>
<Key word="exponent"/>
<Key word="external"/>
<Key word="file"/>
<Key word="float"/>
<Key word="floor"/>
<Key word="fmt"/>
<Key word="forall"/>
<Key word="form"/>
<Key word="format"/>
<Key word="formatted"/>
<Key word="fraction"/>
<Key word="function"/>
<Key word="gamma"/>
<Key word="get_command"/>
<Key word="get_command_argument"/>
<Key word="get_environment_variable"/>
<Key word="getarg"/>
<Key word="goto"/>
<Key word="huge"/>
<Key word="iabs"/>
<Key word="iachar"/>
<Key word="iand"/>
<Key word="iargc"/>
<Key word="ibclr"/>
<Key word="ibits"/>
<Key word="ibset"/>
<Key word="ichar"/>
<Key word="idim"/>
<Key word="idint"/>
<Key word="idnint"/>
<Key word="ieor"/>
<Key word="if"/>
<Key word="ifix"/>
<Key word="implicit"/>
<Key word="in"/>
<Key word="include"/>
<Key word="index"/>
<Key word="inout"/>
<Key word="inquire"/>
<Key word="int"/>
<Key word="integer"/>
<Key word="intent"/>
<Key word="interface"/>
<Key word="intrinsic"/>
<Key word="iolength"/>
<Key word="ior"/>
<Key word="iostat"/>
<Key word="iqint"/>
<Key word="is_iostat_end"/>
<Key word="is_iostat_eor"/>
<Key word="ishft"/>
<Key word="ishftc"/>
<Key word="isign"/>
<Key word="kind"/>
<Key word="lbound"/>
<Key word="len"/>
<Key word="len_trim"/>
<Key word="lge"/>
<Key word="lgt"/>
<Key word="lle"/>
<Key word="llt"/>
<Key word="loc"/>
<Key word="log"/>
<Key word="log10"/>
<Key word="logical"/>
<Key word="matmul"/>
<Key word="max"/>
<Key word="max0"/>
<Key word="max1"/>
<Key word="maxexponent"/>
<Key word="maxloc"/>
<Key word="maxval"/>
<Key word="merge"/>
<Key word="min"/>
<Key word="min0"/>
<Key word="min1"/>
<Key word="minexponent"/>
<Key word="minloc"/>
<Key word="minval"/>
<Key word="mod"/>
<Key word="module"/>
<Key word="modulo"/>
<Key word="move_alloc"/>
<Key word="mvbits"/>
<Key word="name"/>
<Key word="named"/>
<Key word="namelist"/>
<Key word="nearest"/>
<Key word="new_line"/>
<Key word="nextrec"/>
<Key word="nint"/>
<Key word="nml"/>
<Key word="none"/>
<Key word="norm2"/>
<Key word="not"/>
<Key word="null"/>
<Key word="nullify"/>
<Key word="number"/>
<Key word="only"/>
<Key word="open"/>
<Key word="opened"/>
<Key word="operator"/>
<Key word="optional"/>
<Key word="or"/>
<Key word="out"/>
<Key word="pack"/>
<Key word="pad"/>
<Key word="parameter"/>
<Key word="pause"/>
<Key word="pointer"/>
<Key word="position"/>
<Key word="precision"/>
<Key word="present"/>
<Key word="print"/>
<Key word="private"/>
<Key word="procedure"/>
<Key word="product"/>
<Key word="program"/>
<Key word="public"/>
<Key word="pure"/>
<Key word="radix"/>
<Key word="random_number"/>
<Key word="random_seed"/>
<Key word="range"/>
<Key word="read"/>
<Key word="readwrite"/>
<Key word="real"/>
<Key word="rec"/>
<Key word="recl"/>
<Key word="record"/>
<Key word="recursive"/>
<Key word="repeat"/>
<Key word="reshape"/>
<Key word="result"/>
<Key word="return"/>
<Key word="rewind"/>
<Key word="rrspacing"/>
<Key word="save"/>
<Key word="scale"/>
<Key word="scan"/>
<Key word="select"/>
<Key word="selected_char_kind"/>
<Key word="selected_int_kind"/>
<Key word="selected_real_kind"/>
<Key word="sequential"/>
<Key word="set_exponent"/>
<Key word="shape"/>
<Key word="sign"/>
<Key word="sin"/>
<Key word="sinh"/>
<Key word="size"/>
<Key word="sngl"/>
<Key word="spacing"/>
<Key word="spread"/>
<Key word="sqrt"/>
<Key word="status"/>
<Key word="stop"/>
<Key word="structure"/>
<Key word="subroutine"/>
<Key word="sum"/>
<Key word="system_clock"/>
<Key word="tan"/>
<Key word="tanh"/>
<Key word="target"/>
<Key word="then"/>
<Key word="tiny"/>
<Key word="transfer"/>
<Key word="transpose"/>
<Key word="trim"/>
<Key word="type"/>
<Key word="ubound"/>
<Key word="unformatted"/>
<Key word="unit"/>
<Key word="unpack"/>
<Key word="use"/>
<Key word="verify"/>
<Key word="where"/>
<Key word="while"/>
<Key word="write"/>
<Key word="zabs"/>
<Key word="zcos"/>
<Key word="zexp"/>
<Key word="zlog"/>
<Key word="zsin"/>
<Key word="zsqrt"/>
</KeyWords>
<KeyWords name="Keywords2" color="#FFC586C0" bold="false" italic="false">
<Key word="ccos"/>
<Key word="cdabs"/>
<Key word="cdcos"/>
<Key word="cdexp"/>
<Key word="cdlog"/>
<Key word="cdsin"/>
<Key word="cdsqrt"/>
<Key word="ceiling"/>
<Key word="cexp"/>
<Key word="clog"/>
<Key word="cmplx"/>
<Key word="cpu_time"/>
<Key word="cqabs"/>
<Key word="cqcos"/>
<Key word="cqexp"/>
<Key word="cqlog"/>
<Key word="cqsin"/>
<Key word="cqsqrt"/>
<Key word="cshift"/>
<Key word="csin"/>
<Key word="csqrt"/>
</KeyWords>
<KeyWords name="Keywords3" color="#FF4EC9B0" bold="false" italic="false">
<Key word="qabs"/>
<Key word="qacos"/>
<Key word="qasin"/>
<Key word="qatan"/>
<Key word="qatan2"/>
<Key word="qcmplx"/>
<Key word="qconjg"/>
<Key word="qcos"/>
<Key word="qcosh"/>
<Key word="qdim"/>
<Key word="qerf"/>
<Key word="qerfc"/>
<Key word="qexp"/>
<Key word="qgamma"/>
<Key word="qimag"/>
<Key word="qlgama"/>
<Key word="qlog"/>
<Key word="qlog10"/>
<Key word="qmax1"/>
<Key word="qmin1"/>
<Key word="qmod"/>
<Key word="qnint"/>
<Key word="qsign"/>
<Key word="qsin"/>
<Key word="qsinh"/>
<Key word="qsqrt"/>
<Key word="qtan"/>
<Key word="qtanh"/>
</KeyWords>
</RuleSet>
</RuleSets>
</SyntaxDefinition>

View File

@@ -23,11 +23,11 @@
<Property name="LineComment" value="!"/>
</Properties>
<Digits name="Digits" bold="false" italic="false" color="Red"/>
<Digits name="Digits" bold="false" italic="false" color="DarkBlue"/>
<RuleSets>
<RuleSet ignorecase="true">
<Delimiters>&amp;&lt;&gt;~!%^*()-+=|\#/{}[]:;"' , ?</Delimiters>
<Delimiters>&amp;&lt;&gt;~!%^*()-+=|\#/{}[]:;\"' , ?</Delimiters>
<Span name="LineComment" stopateol="true" color="Green" bold="false" italic="false">
<Begin>!</Begin>
@@ -116,7 +116,6 @@
<Key word="dacos"/>
<Key word="dasin"/>
<Key word="data"/>
<Key word="data"/>
<Key word="datan"/>
<Key word="datan2"/>
<Key word="date_and_time"/>
@@ -163,7 +162,6 @@
<Key word="elseif"/>
<Key word="elsewhere"/>
<Key word="end"/>
<Key word="end"/>
<Key word="enddo"/>
<Key word="endfile"/>
<Key word="endif"/>
@@ -181,7 +179,6 @@
<Key word="exp"/>
<Key word="exponent"/>
<Key word="external"/>
<Key word="external"/>
<Key word="file"/>
<Key word="float"/>
<Key word="floor"/>
@@ -223,8 +220,6 @@
<Key word="integer"/>
<Key word="intent"/>
<Key word="interface"/>
<Key word="interface"/>
<Key word="intrinsic"/>
<Key word="intrinsic"/>
<Key word="iolength"/>
<Key word="ior"/>
@@ -236,10 +231,8 @@
<Key word="ishftc"/>
<Key word="isign"/>
<Key word="kind"/>
<Key word="kind"/>
<Key word="lbound"/>
<Key word="len"/>
<Key word="len"/>
<Key word="len_trim"/>
<Key word="lge"/>
<Key word="lgt"/>
@@ -249,7 +242,6 @@
<Key word="log"/>
<Key word="log10"/>
<Key word="logical"/>
<Key word="logical"/>
<Key word="matmul"/>
<Key word="max"/>
<Key word="max0"/>
@@ -300,12 +292,10 @@
<Key word="present"/>
<Key word="print"/>
<Key word="private"/>
<Key word="private"/>
<Key word="procedure"/>
<Key word="product"/>
<Key word="program"/>
<Key word="public"/>
<Key word="public"/>
<Key word="pure"/>
<Key word="radix"/>
<Key word="random_number"/>
@@ -314,7 +304,6 @@
<Key word="read"/>
<Key word="readwrite"/>
<Key word="real"/>
<Key word="real"/>
<Key word="rec"/>
<Key word="recl"/>
<Key word="record"/>
@@ -326,7 +315,6 @@
<Key word="rewind"/>
<Key word="rrspacing"/>
<Key word="save"/>
<Key word="save"/>
<Key word="scale"/>
<Key word="scan"/>
<Key word="select"/>
@@ -368,7 +356,6 @@
<Key word="where"/>
<Key word="while"/>
<Key word="write"/>
<Key word="write"/>
<Key word="zabs"/>
<Key word="zcos"/>
<Key word="zexp"/>