ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Proto​Buf​Code​Formatter

by DirkBrand ST2

Sublime plugin that allows auto-formatting of Protocol Buffer Code.

Labels formatting

Details

Installs

  • Total 1K
  • Win 523
  • OS X 346
  • Linux 139
Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0
OS X 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

ProtoBufCodeFormatter_Sublime

Sublime-Text-2 plugin that allows auto-formatting of Protocol Buffer Code on save.

Installation

ProtoBufCodeFormatter is available via Package Control and can be found as ProtoBufCodeFormatter.

*Important this plugin uses the GOPATH, please set it in Settings - User.

Requirements

  • Golang v1.0 or higher
  • Correctly set PROTOPATH, GOROOT and GOBIN in the Settings - User.

Open Settings - User under Preferences/Package Settings and edit to contain the correct path information. Add variable GOBIN and enter the location of your Go Binary. Add variable PROTOPATH and enter any locations of Protocol Buffers that are imported by your protocol buffers. Optionally add a GOROOT variable to show the location of your Go workspace. Look at Settings - Default as an example.

Limitations

  1. Formatter cannot preserve order of structures. The order is pre-determined.

  2. For comments, outer extend' groups are logically grouped together, so inner comments are lost.

  3. Style of comments are not preserved (/* */ vs. //), so both single-line and multi-line comments are shown with //.