aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorbuz <852136+buztard@users.noreply.github.com>2023-09-14 19:51:40 +0200
committerGitHub <noreply@github.com>2023-09-14 10:51:40 -0700
commit2b73887fd75e1f6efc352cec6bd7e39157c3732e (patch)
treeba623d2712b0c0a4d7492cdd463b78fa4d3b0350 /lua
parent36269c8faadf123f1405bc0cb9f3f9fab387d56c (diff)
feat: add buf as protobuf linter (#43)
Diffstat (limited to 'lua')
-rw-r--r--lua/conform/formatters/buf.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/lua/conform/formatters/buf.lua b/lua/conform/formatters/buf.lua
new file mode 100644
index 0000000..bb64c26
--- /dev/null
+++ b/lua/conform/formatters/buf.lua
@@ -0,0 +1,11 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://buf.build/docs/lint/overview",
+ description = "A new way of working with Protocol Buffers",
+ },
+ command = "buf",
+ args = { "format", "-w", "$FILENAME" },
+ stdin = false,
+ cwd = require("conform.util").root_file({ "buf.yaml" }),
+}