summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMads Hougesen <mads@mhouge.dk>2024-04-17 16:03:36 +0200
committerGitHub <noreply@github.com>2024-04-17 10:03:36 -0400
commit34d3c5f58017b1a7e1cd23739b263d7af0f66d7c (patch)
treec540348779452c41c6d45e7a6a1f96b9c15c0cb5
parent820eec990d5f332d30cf939954c8672a43a0459e (diff)
feat: add support for mdsf (#380)
-rw-r--r--README.md1
-rw-r--r--doc/conform.txt1
-rw-r--r--lua/conform/formatters/mdsf.lua10
3 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 2bc283f..b00770e 100644
--- a/README.md
+++ b/README.md
@@ -247,6 +247,7 @@ You can view this list in vim with `:help conform-formatters`
- [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.
+- [mdsf](https://github.com/hougesen/mdsf) - Format markdown code blocks using your favorite code formatters.
- [mdslw](https://github.com/razziel89/mdslw) - Prepare your markdown for easy diff'ing by adding line breaks after every sentence.
- [mix](https://hexdocs.pm/mix/main/Mix.Tasks.Format.html) - Format Elixir files using the mix format command.
- [nimpretty](https://github.com/nim-lang/nim) - nimpretty is a Nim source code beautifier that follows the official style guide.
diff --git a/doc/conform.txt b/doc/conform.txt
index b26bbb2..24c42e5 100644
--- a/doc/conform.txt
+++ b/doc/conform.txt
@@ -274,6 +274,7 @@ FORMATTERS *conform-formatter
interface for linting Markdown/CommonMark files with the
markdownlint library.
`mdformat` - An opinionated Markdown formatter.
+`mdsf` - Format markdown code blocks using your favorite code formatters.
`mdslw` - Prepare your markdown for easy diff'ing by adding line breaks after
every sentence.
`mix` - Format Elixir files using the mix format command.
diff --git a/lua/conform/formatters/mdsf.lua b/lua/conform/formatters/mdsf.lua
new file mode 100644
index 0000000..98ceaef
--- /dev/null
+++ b/lua/conform/formatters/mdsf.lua
@@ -0,0 +1,10 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/hougesen/mdsf",
+ description = "Format markdown code blocks using your favorite code formatters.",
+ },
+ command = "mdsf",
+ args = { "format", "$FILENAME" },
+ stdin = false,
+}