From ac5c7ac2a23ba8be7743fd8dd92437bd986687f7 Mon Sep 17 00:00:00 2001 From: Ben Mayer Date: Sat, 5 Oct 2024 23:16:35 +0200 Subject: [PATCH] Add `mdformat` formatter --- README.md | 1 + lua/guard-collection/formatter.lua | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 090214d..b377ad5 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ - [ ] [ktlint](https://github.com/pinterest/ktlint) - [ ] [ktfmt](https://github.com/facebook/ktfmt) - [x] [latexindent](https://github.com/cmhughes/latexindent.pl) +- [ ] [mdformat](https://github.com/executablebooks/mdformat) - [ ] [mixformat](https://github.com/elixir-lang/elixir/) - [ ] [nixfmt](https://github.com/serokell/nixfmt) - [ ] [ormolu](https://hackage.haskell.org/package/ormolu) diff --git a/lua/guard-collection/formatter.lua b/lua/guard-collection/formatter.lua index 962a510..2379fa3 100644 --- a/lua/guard-collection/formatter.lua +++ b/lua/guard-collection/formatter.lua @@ -118,6 +118,12 @@ M.latexindent = { stdin = true, } +M.mdformat = { + cmd = 'mdformat', + args = { '-' }, + stdin = true, +} + M.mixformat = { cmd = 'mix', args = { 'format', '-', '--stdin-filename' },