Add GraphQL syntax highlighting

This commit is contained in:
ema
2026-02-10 01:41:11 +08:00
parent 5f21399620
commit 125a871453
2 changed files with 140 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<SyntaxDefinition name="GraphQL" extensions=".graphql;.gql;.gqls">
<Environment>
<Default color="#D4D4D4" bgcolor="#1E1E1E"/>
<Selection color="#1E1E1E" bgcolor="#264F78"/>
<LineNumbers color="#858585" bgcolor="#1E1E1E"/>
<CaretMarker color="#AEAFAD"/>
<VRuler color="#2A2A2A"/>
<FoldLine color="#858585" bgcolor="#1E1E1E"/>
<FoldMarker color="#D4D4D4" bgcolor="#1E1E1E"/>
<SelectedFoldLine color="#D4D4D4" bgcolor="#1E1E1E"/>
<EOLMarkers color="#404040"/>
<SpaceMarkers color="#404040"/>
<TabMarkers color="#404040"/>
<InvalidLines color="#404040"/>
</Environment>
<Properties>
<Property name="LineComment" value="#"/>
</Properties>
<Digits name="Digits" color="#B5CEA8"/>
<RuleSets>
<RuleSet ignorecase="false">
<Delimiters>()[]{},:.@`=;+-*/%~ &amp;|^&gt;&lt;!$</Delimiters>
<Span name="LineComment" stopateol="true" color="#608B4E" bold="false" italic="false">
<Begin>#</Begin>
</Span>
<Span name="BlockString" stopateol="false" color="#CE9178" bold="false" italic="false">
<Begin>"""</Begin>
<End>"""</End>
</Span>
<Span name="String" stopateol="true" color="#CE9178" bold="false" italic="false" escapecharacter="\">
<Begin>"</Begin>
<End>"</End>
</Span>
<KeyWords name="Keywords" color="#569CD6" bold="false" italic ="false">
<Key word="query"/>
<Key word="mutation"/>
<Key word="subscription"/>
<Key word="fragment"/>
<Key word="on"/>
<Key word="schema"/>
<Key word="type"/>
<Key word="interface"/>
<Key word="union"/>
<Key word="enum"/>
<Key word="input"/>
<Key word="scalar"/>
<Key word="directive"/>
<Key word="implements"/>
<Key word="extend"/>
<Key word="repeatable"/>
<Key word="true"/>
<Key word="false"/>
<Key word="null"/>
</KeyWords>
</RuleSet>
</RuleSets>
</SyntaxDefinition>

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<SyntaxDefinition name="GraphQL" extensions=".graphql;.gql;.gqls">
<Environment>
<Default color="Black" bgcolor="#FFFFFF"/>
<Selection color="Black" bgcolor="#C3C3FF"/>
<LineNumbers color="Gray" bgcolor="#FFFFFF"/>
<CaretMarker color="#F0F0F1"/>
<VRuler color="#E0E0E5"/>
<FoldLine color="#A0A0A0" bgcolor="#FFFFFF"/>
<FoldMarker color="Black" bgcolor="#FFFFFF"/>
<SelectedFoldLine color="Black" bgcolor="#FFFFFF"/>
<EOLMarkers color="#CACAD2"/>
<SpaceMarkers color="#B6B6C0"/>
<TabMarkers color="#B6B6C0"/>
<InvalidLines color="#B6B6C0"/>
</Environment>
<Properties>
<Property name="LineComment" value="#"/>
</Properties>
<Digits name="Digits" color="Teal"/>
<RuleSets>
<RuleSet ignorecase="false">
<Delimiters>()[]{},:.@`=;+-*/%~ &amp;|^&gt;&lt;!$</Delimiters>
<Span name="LineComment" stopateol="true" color="Green" bold="false" italic="false">
<Begin>#</Begin>
</Span>
<Span name="BlockString" stopateol="false" color="Maroon" bold="false" italic="false">
<Begin>"""</Begin>
<End>"""</End>
</Span>
<Span name="String" stopateol="true" color="Maroon" bold="false" italic="false" escapecharacter="\">
<Begin>"</Begin>
<End>"</End>
</Span>
<KeyWords name="Keywords" color="Blue" bold="false" italic ="false">
<Key word="query"/>
<Key word="mutation"/>
<Key word="subscription"/>
<Key word="fragment"/>
<Key word="on"/>
<Key word="schema"/>
<Key word="type"/>
<Key word="interface"/>
<Key word="union"/>
<Key word="enum"/>
<Key word="input"/>
<Key word="scalar"/>
<Key word="directive"/>
<Key word="implements"/>
<Key word="extend"/>
<Key word="repeatable"/>
<Key word="true"/>
<Key word="false"/>
<Key word="null"/>
</KeyWords>
</RuleSet>
</RuleSets>
</SyntaxDefinition>