Skip to main content

Setting Up Visual Studio Code

Install vscode extension

https://marketplace.visualstudio.com/items?itemName=xaver.clang-format

https://marketplace.visualstudio.com/items?itemName=zxh404.vscode-proto3

https://marketplace.visualstudio.com/items?itemName=Plex.vscode-protolint

Install clang-format

On MacOS:

$ brew install clang-format

On Linux:

$ sudo apt install clang-format

Config vscode setting.json for google standard format

Setting clang-format.executable on your vscode:

Find the clang-format PATH:

$ where clang-format

Open and setup setting.json like below:

  "clang-format.executable": "/usr/local/bin/clang-format",
"clang-format.style": "{ IndentWidth: 2, BasedOnStyle: google, AlignConsecutiveAssignments: true, ColumnLimit: 0}"
"[proto3]": {
"editor.defaultFormatter": "xaver.clang-format",
"editor.formatOnSave": true
},