Skip to content

Commit

Permalink
feat: add mdformat (nvim-lua#68)
Browse files Browse the repository at this point in the history
* feat(formatters): add mdformat for markdown formatting

* docs: add mdformat to readme and conform.txt
  • Loading branch information
rnprest authored Sep 22, 2023
1 parent 9fd54cc commit 4a4c927
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions doc/conform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions lua/conform/formatters/mdformat.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://github.com/executablebooks/mdformat",
description = "An opinionated Markdown formatter.",
},
command = "mdformat",
args = { "-" },
}

0 comments on commit 4a4c927

Please sign in to comment.