Skip to content

proto

The community/lang/proto directory contains files that provide support for the Protocol Buffer language in Talon.

The file proto.py defines a Talon context that activates when the current code language is set to "protobuf". It defines the user.code_type list, which provides voice commands for the various types available in Protocol Buffers, such as string, bytes, int32, bool, double, etc.

The file proto.talon defines the voice commands for interacting with protobuf code. It activates when the code language is set to "protobuf" and applies the user.code_block_c_like tag. It defines voice commands for common keywords like message, package, reserved, and import, and provides commands for specifying types using the user.code_type list defined in proto.py. For example, saying "type string" will insert the text string, and saying "repeated type int32" will insert the text repeated int32.