diff --git a/Comments.tmPreferences b/Comments.tmPreferences index 7248b6f..1ee38cf 100644 --- a/Comments.tmPreferences +++ b/Comments.tmPreferences @@ -1,11 +1,11 @@ - + name Comments scope - source.proto + entity.name.class.message.proto settings shellVariables @@ -14,7 +14,7 @@ name TM_COMMENT_START value - // + // name @@ -32,7 +32,7 @@ name TM_COMMENT_DISABLE_INDENT_2 value - yes + diff --git a/Protobuf.JSON-tmLanguage b/Protobuf.JSON-tmLanguage deleted file mode 100644 index 89f8c2d..0000000 --- a/Protobuf.JSON-tmLanguage +++ /dev/null @@ -1,294 +0,0 @@ -{ - "scopeName": "source.proto", - "fileTypes": [ - "proto" - ], - "repository": { - "constants": { - "match": "\\b(true|false|max)\\b", - "name": "constant.language.proto" - }, - "strings": { - "name": "string.quoted.double.proto", - "end": "\"", - "begin": "\"" - }, - "enum": { - "beginCaptures": { - "3": { - "name": "entity.name.class.proto" - }, - "1": { - "name": "keyword.source.proto" - } - }, - "end": "\\}", - "begin": "(enum)(\\s+)([A-Za-z][A-Za-z0-9_]*)(\\s*)(\\{)?", - "patterns": [ - { - "include": "#option" - }, - { - "include": "#comments" - }, - { - "match": "\\b(to|extensions)\\b", - "name": "keyword.source.proto" - }, - { - "match": "([A-Za-z][A-Za-z0-9_]*)(\\s*)(=)(\\s*)([0-9]*)", - "captures": { - "5": { - "name": "constant.numeric.proto" - }, - "1": { - "name": "constant.other.proto" - } - } - } - ] - }, - "comments": { - "patterns": [ - { - "name": "comment.block.proto", - "end": "\\*/", - "begin": "/\\*" - }, - { - "name": "comment.line.double-slash.proto", - "end": "$\\n?", - "begin": "//" - } - ] - }, - "message": { - "beginCaptures": { - "3": { - "name": "entity.name.class.message.proto" - }, - "1": { - "name": "keyword.source.proto" - } - }, - "end": "\\}", - "begin": "(message|extend)(\\s+)([A-Za-z][A-Za-z0-9_.]*)(\\s*)(\\{)?", - "patterns": [ - { - "include": "$self" - }, - { - "include": "#enum" - }, - { - "include": "#option" - }, - { - "include": "#comments" - }, - { - "include": "#oneof" - }, - { - "beginCaptures": { - "1": { - "name": "keyword.source.proto" - } - }, - "end": ";", - "begin": "(optional|repeated|required|to|extensions)(\\s+)", - "patterns": [ - { - "include": "#storagetypes" - }, - { - "match": "(map)<([A-Za-z][A-Za-z0-9_]*),\\s*([A-Za-z][A-Za-z0-9_]*)>\\s+([A-Za-z][A-Za-z0-9_]*)", - "captures": { - "4": { - "name": "entity.name.class.proto" - }, - "1": { - "name": "keyword.source.proto" - } - } - }, - { - "match": "([A-Za-z][A-Za-z0-9_]*)(\\s+)([A-Za-z][A-Za-z0-9_]*)", - "captures": { - "1": { - "name": "entity.name.class.proto" - } - } - }, - { - "match": "(\\s*)(=)(\\s*)([0-9]*)", - "captures": { - "4": { - "name": "constant.numeric.proto" - } - } - }, - { - "end": "\\]", - "begin": "\\[", - "patterns": [ - { - "match": "default|packed|deprecated|lazy", - "name": "keyword.source.proto" - }, - { - "include": "#constants" - } - ] - } - ] - } - ] - }, - "storagetypes": { - "match": "\\b(double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\\b", - "name": "storage.type.proto" - }, - "service": { - "beginCaptures": { - "3": { - "name": "entity.name.class.message.proto" - }, - "1": { - "name": "keyword.source.proto" - } - }, - "end": "\\}", - "begin": "(service)(\\s+)([A-Za-z][A-Za-z0-9_.]*)(\\s*)(\\{)?", - "patterns": [ - { - "include": "#comments" - }, - { - "beginCaptures": { - "6": { - "name": "keyword.source.proto" - }, - "5": { - "name": "keyword.source.proto" - }, - "2": { - "name": "entity.name.function" - }, - "3": { - "name": "keyword.source.proto" - }, - "1": { - "name": "keyword.source.proto" - } - }, - "end": "\\}|;", - "begin": "(rpc)\\s+([A-Za-z][A-Z-a-z0-9_]+)\\s*\\((stream\\s+)?([A-Za-z0-9_]+)\\)\\s+(returns)\\s+\\((stream\\s+)?([A-Za-z0-9_]+)\\)\\{?" - } - ] - }, - "option": { - "beginCaptures": { - "2": { - "name": "keyword.source.proto" - } - }, - "end": ";", - "begin": "(\\b)(option)(\\b)", - "patterns": [ - { - "include": "#strings" - }, - { - "match": "default|packed|optimize\\_for|java\\_package|java\\_outer\\_classname|go\\_package|deprecated|lazy|\\w+\\_api\\_version", - "name": "storage.type.proto" - }, - { - "match": "(CODE\\_SIZE|SPEED)", - "name": "constant.language.proto" - } - ] - }, - "oneof": { - "beginCaptures": { - "1": { - "name": "keyword.source.proto" - } - }, - "end": "\\}", - "begin": "(oneof)(\\s+)([A-Za-z][A-Za-z0-9_]*)(\\s*)(\\{)?", - "patterns": [ - { - "include": "#option" - }, - { - "include": "#comments" - }, - { - "match": "\\b(to|extensions)\\b", - "name": "keyword.source.proto" - }, - { - "match": "([A-Za-z][A-Za-z0-9_]*)(\\s+)([A-Za-z][A-Za-z0-9_]*)(\\s*)(=)(\\s*)([0-9]*)", - "captures": { - "7": { - "name": "constant.numeric.proto" - }, - "1": { - "name": "entity.name.class.proto" - } - } - } - ] - }, - "packaging": { - "match": "(package|import)(?=(\\s+)([\"]?[A-Za-z][A-Za-z0-9-_./]*[\"]?)(;))", - "captures": { - "2": { - "name": "entity.name.tag" - }, - "1": { - "name": "keyword.source.proto" - } - } - } - }, - "name": "Protocol Buffer", - "uuid": "750ac1f3-b172-48de-b1a4-a3c310c4a293", - "patterns": [ - { - "include": "#comments" - }, - { - "include": "#storagetypes" - }, - { - "include": "#enum" - }, - { - "include": "#message" - }, - { - "include": "#option" - }, - { - "include": "#constants" - }, - { - "include": "#strings" - }, - { - "include": "#oneof" - }, - { - "include": "#packaging" - }, - { - "include": "#service" - }, - { - "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b", - "name": "constant.numeric.proto" - } - ] -} \ No newline at end of file diff --git a/README.md b/README.md index 39b279e..46673bb 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,13 @@ Sublime Syntax Highlighting for Protocol Buffers Contributors ------------ +In alphabetical order: * [awalterschulze](https://github.com/awalterschulze) -* [vihangm](https://github.com/vihangm) -* [jtcorbett](https://github.com/jtcorbett) * [herolover](https://github.com/herolover) -* [lvzixun](https://github.com/lvzixun) * [Jazzer360](https://github.com/Jazzer360) +* [jtcorbett](https://github.com/jtcorbett) * [lohmander](https://github.com/lohmander) -* [yangsu](https://github.com/yangsu) +* [lvzixun](https://github.com/lvzixun) +* [vgough](https://github.com/vgough) +* [vihangm](https://github.com/vihangm) +* [yangsu](https://github.com/yangsu) \ No newline at end of file