3

Is there a way to auto indent Proto file code in Visual Studio. For example, C# code can be indented but proto file isnt getting indented in visual studio 2019. Thanks

Gauravsa
  • 6,330
  • 2
  • 21
  • 30
  • 1
    It's annoying that something so extremely C-like doesn't have a formatter in VS. If you're open to using VsCode, the `vscode-proto3` extension can do it for you. – NPras Jan 25 '22 at 06:09
  • @NPras ok i ll try and give it a go. – Gauravsa Jan 27 '22 at 06:21

1 Answers1

0

Thanks to NPras. I was able to format a proto file using vscode-proto3. Clang-Format also works as an extension in Vs Code. The clang-format needs to be in system path for both the extensions to work.

clang-format extension can be downloaded from here: https://llvm.org/builds/

Gauravsa
  • 6,330
  • 2
  • 21
  • 30