diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 6c5cde1f..22e6a3cc 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -1098,6 +1098,14 @@ Prolog: extensions: - .pro +Protocol Buffer: + type: markup + ace_mode: protobuf + aliases: + - protobuf + - Protocol Buffers + primary_extension: .proto + Puppet: type: programming color: "#cc5555" diff --git a/samples/Protocol Buffer/addressbook.proto b/samples/Protocol Buffer/addressbook.proto new file mode 100644 index 00000000..2dee2965 --- /dev/null +++ b/samples/Protocol Buffer/addressbook.proto @@ -0,0 +1,27 @@ +package tutorial; + +option java_package = "com.example.tutorial"; +option java_outer_classname = "AddressBookProtos"; + +message Person { + required string name = 1; + required int32 id = 2; + optional string email = 3; + + enum PhoneType { + MOBILE = 0; + HOME = 1; + WORK = 2; + } + + message PhoneNumber { + required string number = 1; + optional PhoneType type = 2 [default = HOME]; + } + + repeated PhoneNumber phone = 4; +} + +message AddressBook { + repeated Person person = 1; +}