diff --git a/README.md b/README.md index 350e2c3..a26a8d4 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ - [x] [cbfmt](https://github.com/lukas-reineke/cbfmt) - [x] [clang-format](https://www.kernel.org/doc/html/latest/process/clang-format.html) - [ ] [djhtml](https://github.com/rtts/djhtml) +- [ ] [dprint](https://dprint.dev/) - [ ] [fish_indent](https://fishshell.com/docs/current/cmds/fish_indent.html) - [ ] [fnlfmt](https://git.sr.ht/~technomancy/fnlfmt) - [ ] [gofmt](https://pkg.go.dev/cmd/gofmt) diff --git a/lua/guard-collection/formatter.lua b/lua/guard-collection/formatter.lua index 9ec3400..b39a971 100644 --- a/lua/guard-collection/formatter.lua +++ b/lua/guard-collection/formatter.lua @@ -35,6 +35,14 @@ M.djhtml = { stdin = true, } +M.dprint = { + cmd = 'dprint', + args = { 'fmt', '--stdin' }, + stdin = true, + fname = true, + find = { 'dprint.json', 'dprint.jsonc', '.dprint.json', '.dprint.jsonc' }, +} + M.fish_indent = { cmd = 'fish_indent', stdin = true,