Diff
1diff --git a/plugins/buf/README.md b/plugins/buf/README.md
2new file mode 100644
3index 0000000000000000000000000000000000000000..946cf38dd84f7d809982ecd42a0e15477c57087f
4--- /dev/null
5+++ b/plugins/buf/README.md
6@@ -0,0 +1,9 @@
7+# Buf plugin
8+
9+This plugin adds completion for [Buf CLI](https://github.com/bufbuild/buf), a tool working with Protocol Buffers.
10+
11+To use it, add `buf` to the plugins array in your zshrc file:
12+
13+```zsh
14+plugins=(... buf)
15+```
16diff --git a/plugins/buf/buf.plugin.zsh b/plugins/buf/buf.plugin.zsh
17new file mode 100644
18index 0000000000000000000000000000000000000000..0b251ac37aa69d6bdb0c7639e2fa6dcc7b90d3ed
19--- /dev/null
20+++ b/plugins/buf/buf.plugin.zsh
21@@ -0,0 +1,14 @@
22+# Autocompletion for the Buf CLI (buf).
23+if (( !$+commands[buf] )); then
24+ return
25+fi
26+# If the completion file doesn't exist yet, we need to autoload it and
27+# bind it to `buf`. Otherwise, compinit will have already done that.
28+if [[ ! -f "$ZSH_CACHE_DIR/completions/_buf" ]]; then
29+ typeset -g -A _comps
30+ autoload -Uz _buf
31+ _comps[buf]=_buf
32+fi
33+
34+# Generate and load buf completion
35+buf completion zsh >! "$ZSH_CACHE_DIR/completions/_buf" &|