bufbuild/vscode-buf

Automatically run `buf generate` when proto files are edited

Opened this issue · 0 comments

One of the biggest points of developer friction when working with protos is regenerating stubs after changing the protos. As quick as the Buf generator is, it would make a lot of sense for it to be automatically run any time proto files in its workspace are modified.

Example workflow:

  1. Developer is implementing a gRPC method in a Node server
  2. Realizes a field is missing from the request proto
  3. Opens the proto file and add the new field
  4. Saves the proto file
  5. Switches back to the server code implementing the gRPC method
  6. The server code is now aware of the new field and can use it

Without this feature, developers need an extra step between 4 and 5 to manually re-run the buf generate command. It's not super time-consuming, but it's extra friction and context switching that can break flow.

Related: I've filed the same request for the IntelliJ plugin as bufbuild/intellij-buf#72