aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsieuwerts <42545850+sieuwerts@users.noreply.github.com>2024-08-07 07:27:03 +0200
committerGitHub <noreply@github.com>2024-08-06 22:27:03 -0700
commit960f51becccadc36825b2c2db266c8cffaeadbde (patch)
tree79cd9aa0217c4be1cbfd2318044d87681e6028b7
parent25d48271e3d4404ba017cb92a37d3a681c1ad149 (diff)
feat: add support for markdownfmt (#511)
Co-authored-by: Christoffer Pettersson <christoffer.pettersson@schibsted.com>
-rw-r--r--README.md1
-rw-r--r--doc/conform.txt1
-rw-r--r--lua/conform/formatters/markdownfmt.lua8
3 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index 66c6e04..a98fda2 100644
--- a/README.md
+++ b/README.md
@@ -273,6 +273,7 @@ You can view this list in vim with `:help conform-formatters`
- [llf](https://repo.or.cz/llf.git) - A LaTeX reformatter / beautifier.
- [lua-format](https://github.com/Koihik/LuaFormatter) - Code formatter for Lua.
- [markdown-toc](https://github.com/jonschlinkert/markdown-toc) - API and CLI for generating a markdown TOC (table of contents) for a README or any markdown files.
+- [markdownfmt](https://github.com/shurcooL/markdownfmt) - Like gofmt, but for Markdown.
- [markdownlint](https://github.com/DavidAnson/markdownlint) - A Node.js style checker and lint tool for Markdown/CommonMark files.
- [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) - A fast, flexible, configuration-based command-line interface for linting Markdown/CommonMark files with the markdownlint library.
- [mdformat](https://github.com/executablebooks/mdformat) - An opinionated Markdown formatter.
diff --git a/doc/conform.txt b/doc/conform.txt
index f614126..1a44d63 100644
--- a/doc/conform.txt
+++ b/doc/conform.txt
@@ -378,6 +378,7 @@ FORMATTERS *conform-formatter
`lua-format` - Code formatter for Lua.
`markdown-toc` - API and CLI for generating a markdown TOC (table of contents)
for a README or any markdown files.
+`markdownfmt` - Like gofmt, but for Markdown.
`markdownlint` - A Node.js style checker and lint tool for Markdown/CommonMark
files.
`markdownlint-cli2` - A fast, flexible, configuration-based command-line
diff --git a/lua/conform/formatters/markdownfmt.lua b/lua/conform/formatters/markdownfmt.lua
new file mode 100644
index 0000000..66cd7b2
--- /dev/null
+++ b/lua/conform/formatters/markdownfmt.lua
@@ -0,0 +1,8 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/shurcooL/markdownfmt",
+ description = "Like gofmt, but for Markdown.",
+ },
+ command = "markdownfmt",
+}