Created
February 22, 2018 18:20
-
-
Save openbrian/b979f993cffd1c44e3b61036c6615d46 to your computer and use it in GitHub Desktop.
Gherkin syntax highlighting for KWrite, Kate, KDevelop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE language SYSTEM "language.dtd"> | |
<!-- Gherkin, syntax definition based on sql-postgresql.xml by Yury Lebedev --> | |
<language name="Gherkin" version="0.1" kateversion="2.4" section="Other" extensions="*.feature;*.FEATURE" mimetype="text/x-gherkin" casesensitive="0" author="Brian DeRocher (brian@derocher)" license="GPL"> | |
<highlighting> | |
<list name="keywords"> | |
<item> FEATURE: </item> | |
<item> SCENARIO: </item> | |
<item> SCENARIO OUTLINE: </item> | |
<item> BACKGROUND: </item> | |
<item> EXAMPLES: </item> | |
</list> | |
<list name="functions"> | |
<item> GIVEN </item> | |
<item> WHEN </item> | |
<item> THEN </item> | |
<item> AND </item> | |
<item> BUT </item> | |
</list> | |
<contexts> | |
<context name="Normal" attribute="Normal Text" lineEndContext="#stay"> | |
<keyword attribute="Keyword" context="#stay" String="keywords"/> | |
<keyword attribute="Function" context="#stay" String="functions"/> | |
<RegExpr attribute="Annotation" context="#stay" String="@[_\w]+"/> | |
<Float attribute="Float" context="#stay"/> | |
<Int attribute="Decimal" context="#stay"/> | |
<DetectChar attribute="String" context="String" char="'"/> | |
<DetectChar attribute="String" context="String" char="""/> | |
<DetectChar attribute="Comment" context="SingleLineComment" char="#"/> | |
</context> | |
<context name="String" attribute="String" lineEndContext="#stay"> | |
<DetectChar attribute="String" context="#pop" char="'"/> | |
<DetectChar attribute="String" context="#pop" char="""/> | |
</context> | |
<context name="SingleLineComment" attribute="Comment" lineEndContext="#pop"/> | |
<context name="Identifier" attribute="Identifier" lineEndContext="#pop"> | |
<DetectChar attribute="Identifier" context="#pop" char="""/> | |
</context> | |
</contexts> | |
<itemDatas> | |
<itemData name="Annotation" defStyleNum="dsAttribute"/> | |
<itemData name="Normal Text" defStyleNum="dsNormal"/> | |
<itemData name="Keyword" defStyleNum="dsKeyword"/> | |
<itemData name="Function" defStyleNum="dsFunction"/> | |
<itemData name="Decimal" defStyleNum="dsDecVal"/> | |
<itemData name="Float" defStyleNum="dsFloat"/> | |
<itemData name="String" defStyleNum="dsString"/> | |
<itemData name="String Char" defStyleNum="dsChar"/> | |
<itemData name="Comment" defStyleNum="dsComment"/> | |
<itemData name="Identifier" defStyleNum="dsOthers"/> | |
</itemDatas> | |
</highlighting> | |
<general> | |
<comments> | |
<comment name="singleLine" start="#"/> | |
</comments> | |
<keywords casesensitive="0" weakDeliminator="+-*/|=!<>~^:.@&#%?"/> | |
</general> | |
</language> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment