aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/dprint.lua
blob: 8c792216e5c9c8078546e911276b3acc60c6cbc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local util = require("conform.util")
---@type conform.FileFormatterConfig
return {
  meta = {
    url = "https://github.com/dprint/dprint",
    description = "Pluggable and configurable code formatting platform written in Rust.",
  },
  command = "dprint",
  args = { "fmt", "--stdin", "$FILENAME" },
  cwd = util.root_file({
    "dprint.json",
    ".dprint.json",
    "dprint.jsonc",
    ".dprint.jsonc",
  }),
}