1# Proto
2
3Proto/proto3 (Protocol Buffers definition language) support is available natively in Zed.
4
5- Tree Sitter: [coder3101/tree-sitter-proto](https://github.com/coder3101/tree-sitter-proto)
6- Language Server: [protols](https://github.com/coder3101/protols)
7
8## Formatting
9
10ProtoLS supports formatting if you have `clang-format` installed.
11
12```sh
13# MacOS:
14brew install clang-format
15# Ubuntu
16sudo apt-get install clang-format
17# Fedora
18sudo dnf install clang-tools-extra
19```
20
21To customize your formatting preferences, create a `.clang-format` file, e.g.:
22
23```clang-format
24IndentWidth: 4
25ColumnLimit: 120
26```
27
28Or you can have zed directly invoke `clang-format` by specifying it as a [formatter](https://zed.dev/docs/configuring-zed#formatter) in your settings:
29
30```json
31 "languages": {
32 "Proto": {
33 "format_on_save": "on",
34 "tab_size": 4,
35 "formatter": {
36 "external": {
37 "command": "clang-format",
38 "arguments": ["-style={IndentWidth: 4, ColumnLimit: 0}"]
39 }
40 }
41 },
42 }
43```