Last active
August 29, 2015 13:57
-
-
Save IlanFrumer/9358414 to your computer and use it in GitHub Desktop.
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> | |
<string>proto</string> | |
</array> | |
<key>keyEquivalent</key> | |
<string>^~P</string> | |
<key>name</key> | |
<string>Protocol Buffers</string> | |
<key>patterns</key> | |
<array> | |
<dict> | |
<key>match</key> | |
<string>\b(default|enum|extend|extensions|message|option|package|rpc|returns|service)\b</string> | |
<key>name</key> | |
<string>keyword.operator.proto</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>//</string> | |
<key>end</key> | |
<string>$</string> | |
<key>name</key> | |
<string>comment.line.double-slash.proto</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>"</string> | |
<key>end</key> | |
<string>"</string> | |
<key>name</key> | |
<string>string.quoted.double.proto</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b(bool|bytes|double|fixed32|fixed64|float|int32|int64|sfixed32|sfixed64|sint32|sint64|string|uint32|uint64)\b</string> | |
<key>name</key> | |
<string>storage.type.proto</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>keyword.operator.proto</string> | |
</dict> | |
<key>2</key> | |
<dict> | |
<key>name</key> | |
<string>storage.type.proto</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>\b(repeated|required|optional)\s+(\w+)\b</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>^(import)\s</string> | |
<key>name</key> | |
<string>keyword.control.import.proto</string> | |
</dict> | |
<dict> | |
<key>match</key> | |
<string>\b((([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|F|f)?\b</string> | |
<key>name</key> | |
<string>constant.numeric.proto</string> | |
</dict> | |
<dict> | |
<key>captures</key> | |
<dict> | |
<key>1</key> | |
<dict> | |
<key>name</key> | |
<string>entity.name.function.proto</string> | |
</dict> | |
</dict> | |
<key>match</key> | |
<string>\b([a-zA-Z0-9_\.]*?)\(</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>/\*</string> | |
<key>captures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.comment.proto</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>\*/</string> | |
<key>name</key> | |
<string>comment.block.proto</string> | |
</dict> | |
<dict> | |
<key>begin</key> | |
<string>//</string> | |
<key>beginCaptures</key> | |
<dict> | |
<key>0</key> | |
<dict> | |
<key>name</key> | |
<string>punctuation.definition.comment.proto</string> | |
</dict> | |
</dict> | |
<key>end</key> | |
<string>$\n?</string> | |
<key>name</key> | |
<string>comment.line.double-slash.proto</string> | |
</dict> | |
</array> | |
<key>scopeName</key> | |
<string>source.proto</string> | |
<key>uuid</key> | |
<string>D6B0BFD2-F416-4E91-8C53-CD71EA3EE951</string> | |
</dict> | |
</plist> |
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
{ | |
"fileTypes": [ | |
"proto" | |
], | |
"keyEquivalent": "^~P", | |
"name": "Protocol Buffers", | |
"patterns": [ | |
{ | |
"match": "\\b(default|enum|extend|extensions|message|option|package|rpc|returns|service)\\b", | |
"name": "keyword.operator.proto" | |
}, | |
{ | |
"begin": "//", | |
"end": "$", | |
"name": "comment.line.double-slash.proto" | |
}, | |
{ | |
"begin": "\"", | |
"end": "\"", | |
"name": "string.quoted.double.proto" | |
}, | |
{ | |
"match": "\\b(bool|bytes|double|fixed32|fixed64|float|int32|int64|sfixed32|sfixed64|sint32|sint64|string|uint32|uint64)\\b", | |
"name": "storage.type.proto" | |
}, | |
{ | |
"captures": { | |
"1": { | |
"name": "keyword.operator.proto" | |
}, | |
"2": { | |
"name": "storage.type.proto" | |
} | |
}, | |
"match": "\\b(repeated|required|optional)\\s+(\\w+)\\b" | |
}, | |
{ | |
"match": "^(import)\\s", | |
"name": "keyword.control.import.proto" | |
}, | |
{ | |
"match": "\\b((([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|F|f)?\\b", | |
"name": "constant.numeric.proto" | |
}, | |
{ | |
"captures": { | |
"1": { | |
"name": "entity.name.function.proto" | |
} | |
}, | |
"match": "\\b([a-zA-Z0-9_\\.]*?)\\(" | |
}, | |
{ | |
"begin": "/\\*", | |
"captures": { | |
"0": { | |
"name": "punctuation.definition.comment.proto" | |
} | |
}, | |
"end": "\\*/", | |
"name": "comment.block.proto" | |
}, | |
{ | |
"begin": "//", | |
"beginCaptures": { | |
"0": { | |
"name": "punctuation.definition.comment.proto" | |
} | |
}, | |
"end": "$\\n?", | |
"name": "comment.line.double-slash.proto" | |
} | |
], | |
"scopeName": "source.proto", | |
"uuid": "D6B0BFD2-F416-4E91-8C53-CD71EA3EE951" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Resources
Language Grammars & list of all scopes ( nested ):
http://manual.macromates.com/en/language_grammars#naming_conventions
Sublime plugin which convert between plist <-> json
https://github.com/facelessuser/SerializedDataConverter
Sublime Text uses Oniguruma‘s syntax for regular expressions in syntax definitions:
http://www.geocities.jp/kosako3/oniguruma/doc/RE.txt
Syntax Definitions: Sublime docs:
http://docs.sublimetext.info/en/latest/extensibility/syntaxdefs.html?highlight=syntax