Last active
January 22, 2017 21:06
-
-
Save jocopa3/e4a35921e4f978572e7f45360d231f37 to your computer and use it in GitHub Desktop.
Syntax Highlighter for my Data Values list: https://gist.github.com/jocopa3/f8c9f9158ede0e9d057781188ba440f5
This file contains 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 plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>fileTypes</key> | |
<array/> | |
<key>name</key> | |
<string>Data Values List</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>include</key> | |
<string>#main</string> | |
</dict> | |
</array> | |
<key>repository</key> | |
<dict> | |
<key>main</key> | |
<dict> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>comment</key> | |
<string>Numeric constant</string> | |
<key>match</key> | |
<string>(?<!\.)\b([0-9]+)\b(?!\.)</string> | |
<key>name</key> | |
<string>constant.numeric.json</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>Hex Value</string> | |
<key>match</key> | |
<string>\b(0x[0-9A-F]+)\b</string> | |
<key>name</key> | |
<string>keyword.other.DataValuesList</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>Block, Item, or Entity name</string> | |
<key>match</key> | |
<string>^((?!(Name|\s{4}))[^\n]\s*([0-9a-zA-Z_]+)(?=(\s\s|\s\(|\.[a-z0-9])))</string> | |
<key>name</key> | |
<string>variable.parameter.DataValuesList</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>Block, Item, or Entity Data Value name</string> | |
<key>match</key> | |
<string>(^((?!Name)[^\n]\s+([0-9a-zA-Z_]+)(?=(\s\s|\s\())))</string> | |
<key>name</key> | |
<string>storage.type.datavalue.DataValuesList</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>Entity type</string> | |
<key>match</key> | |
<string>((?<=[a-z0-9_]\.)[a-z0-9_]+(?=(\s\s|\s\(|\.[a-z0-9])))</string> | |
<key>name</key> | |
<string>storage.type.entitytype.DataValuesList</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>Dot</string> | |
<key>match</key> | |
<string>(?<=[a-z0-9])\.(?=[a-z0-9])</string> | |
<key>name</key> | |
<string>null.dot.DataValuesList</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>Keywords</string> | |
<key>match</key> | |
<string>^(Name)|(\s{2}\b(Id|Data|Full Id)\b)</string> | |
<key>name</key> | |
<string>storage.type.DataValuesList</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>Section Names</string> | |
<key>match</key> | |
<string>([\=]{12})(\s(Blocks|Items|Entities))?</string> | |
<key>name</key> | |
<string>entity.name.section.DataValuesList</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>EDU Section</string> | |
<key>match</key> | |
<string>([\-]{12})(\s(EDU\s(Blocks|Items|Entities)))?</string> | |
<key>name</key> | |
<string>keyword.other.edusection.DataValuesList</string> | |
</dict> | |
<dict> | |
<key>comment</key> | |
<string>Default Text Highlighting</string> | |
<key>match</key> | |
<string>^(?!\s)(.+\n)|(\s\([^\)]+|\)\s)|^(\s{4}[A-Z].+\n)</string> | |
<key>name</key> | |
<string>string.other.DataValuesList</string> | |
</dict> | |
</array> | |
</dict> | |
<key>version</key> | |
<dict> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>comment</key> | |
<string>Version Identifier</string> | |
<key>match</key> | |
<string>\b([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})\b</string> | |
<key>name</key> | |
<string>keyword.control.DataValuesList</string> | |
</dict> | |
</array> | |
</dict> | |
</dict> | |
<key>scopeName</key> | |
<string>source.DataValuesList</string> | |
<key>uuid</key> | |
<string>5840263d-dd17-4170-ab53-24497d03f7d9</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment