summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--doc/conform.txt1
-rw-r--r--lua/conform/formatters/mdformat.lua9
3 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index ff34820..6c1d671 100644
--- a/README.md
+++ b/README.md
@@ -193,6 +193,7 @@ To view configured and available formatters, as well as to see the log file, run
- [jq](https://github.com/stedolan/jq) - Command-line JSON processor.
- [latexindent](https://github.com/cmhughes/latexindent.pl) - A perl script for formatting LaTeX files that is generally included in major TeX distributions.
- [markdownlint](https://github.com/DavidAnson/markdownlint) - A Node.js style checker and lint tool for Markdown/CommonMark files.
+- [mdformat](https://github.com/executablebooks/mdformat) - An opinionated Markdown formatter.
- [nixfmt](https://github.com/serokell/nixfmt) - nixfmt is a formatter for Nix code, intended to apply a uniform style.
- [nixpkgs_fmt](https://github.com/nix-community/nixpkgs-fmt) - nixpkgs-fmt is a Nix code formatter for nixpkgs.
- [ocamlformat](https://github.com/ocaml-ppx/ocamlformat) - Auto-formatter for OCaml code.
diff --git a/doc/conform.txt b/doc/conform.txt
index d9457e2..9e34196 100644
--- a/doc/conform.txt
+++ b/doc/conform.txt
@@ -200,6 +200,7 @@ FORMATTERS *conform-formatter
included in major TeX distributions.
`markdownlint` - A Node.js style checker and lint tool for Markdown/CommonMark
files.
+`mdformat` - An opinionated Markdown formatter.
`nixfmt` - nixfmt is a formatter for Nix code, intended to apply a uniform
style.
`nixpkgs_fmt` - nixpkgs-fmt is a Nix code formatter for nixpkgs.
diff --git a/lua/conform/formatters/mdformat.lua b/lua/conform/formatters/mdformat.lua
new file mode 100644
index 0000000..e291faf
--- /dev/null
+++ b/lua/conform/formatters/mdformat.lua
@@ -0,0 +1,9 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/executablebooks/mdformat",
+ description = "An opinionated Markdown formatter.",
+ },
+ command = "mdformat",
+ args = { "-" },
+}