Browse Source

feat(Editor): Add "some" syntax highlighting for yaml files

feature/net9
Philippe Miossec 8 months ago
parent
commit
7b8ff17ca0
  1. 4
      Project/Resources/SyntaxModes.xml
  2. 38
      Project/Resources/Yaml.xshd

4
Project/Resources/SyntaxModes.xml

@ -362,4 +362,8 @@
name="Xtend" name="Xtend"
extensions=".xtend" /> extensions=".xtend" />
<Mode file="Yaml.xshd"
name="YAML"
extensions=".yaml;.yml" />
</SyntaxModes> </SyntaxModes>

38
Project/Resources/Yaml.xshd

@ -0,0 +1,38 @@
<?xml version="1.0"?>
<SyntaxDefinition xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008"
name="YAML" extensions=".yaml,.yml">
<RuleSet ignorecase="true">
<Delimiters>&amp;|\/"',;=:- $()</Delimiters>
<KeyWords name="Keywords" color="Purple" bold="false" italic="false">
<Key word="true"/>
<Key word="false"/>
<Key word="null"/>
</KeyWords>
<Span name="Comments" color="Green" stopateol="true" >
<Begin>#</Begin>
</Span>
<Span name="DocumentStart" color="LightGreen" stopateol="true" >
<Begin>---</Begin>
</Span>
<Span name="Tag" color="Red" stopateol="true" >
<Begin startofline="true">%</Begin>
</Span>
<Span name="String" stopateol="true" color="Maroon" bold="false" italic="false" escapecharacter="\">
<Begin>"</Begin>
<End>"</End>
</Span>
<Span name="Char" stopateol="true" color="Maroon" bold="false" italic="false" escapecharacter="\">
<Begin>'</Begin>
<End>'</End>
</Span>
<MarkPrevious name="key" color="Blue" bold="false" italic="false">:</MarkPrevious>
</RuleSet>
</SyntaxDefinition>
Loading…
Cancel
Save