From 34d3c5f58017b1a7e1cd23739b263d7af0f66d7c Mon Sep 17 00:00:00 2001 From: Mads Hougesen Date: Wed, 17 Apr 2024 16:03:36 +0200 Subject: feat: add support for mdsf (#380) --- README.md | 1 + doc/conform.txt | 1 + lua/conform/formatters/mdsf.lua | 10 ++++++++++ 3 files changed, 12 insertions(+) create mode 100644 lua/conform/formatters/mdsf.lua 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, +} -- cgit v1.2.3-70-g09d2