diff options
author | Christian Johansen <80620482+chrhjoh@users.noreply.github.com> | 2024-05-11 05:57:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-10 21:57:29 -0600 |
commit | dc950e5717f1da65b1fcd986b1bbff0d6bd0e2ee (patch) | |
tree | f12084d49bc013971b03fda86579eed5d4a0d314 | |
parent | a3e3e0e2966a9fa477bbc86487e920ee0c34f133 (diff) |
feat: add snakefmt formatter for snakemake files (#399)
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | doc/conform.txt | 2 | ||||
-rw-r--r-- | lua/conform/formatters/snakefmt.lua | 10 |
3 files changed, 13 insertions, 0 deletions
@@ -287,6 +287,7 @@ You can view this list in vim with `:help conform-formatters` - [shellharden](https://github.com/anordal/shellharden) - The corrective bash syntax highlighter. - [shfmt](https://github.com/mvdan/sh) - A shell parser, formatter, and interpreter with `bash` support. - [smlfmt](https://github.com/shwestrick/smlfmt) - A custom parser and code formatter for Standard ML. +- [snakefmt](https://github.com/snakemake/snakefmt) - a formatting tool for Snakemake files following the design of Black. - [sql_formatter](https://github.com/sql-formatter-org/sql-formatter) - A whitespace formatter for different query languages. - [sqlfluff](https://github.com/sqlfluff/sqlfluff) - A modular SQL linter and auto-formatter with support for multiple dialects and templated code. - [sqlfmt](https://docs.sqlfmt.com) - sqlfmt formats your dbt SQL files so you don't have to. It is similar in nature to Black, gofmt, and rustfmt (but for SQL) diff --git a/doc/conform.txt b/doc/conform.txt index 7e5041a..e3f38d6 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -327,6 +327,8 @@ FORMATTERS *conform-formatter `shellharden` - The corrective bash syntax highlighter. `shfmt` - A shell parser, formatter, and interpreter with `bash` support. `smlfmt` - A custom parser and code formatter for Standard ML. +`snakefmt` - a formatting tool for Snakemake files following the design of + Black. `sql_formatter` - A whitespace formatter for different query languages. `sqlfluff` - A modular SQL linter and auto-formatter with support for multiple dialects and templated code. diff --git a/lua/conform/formatters/snakefmt.lua b/lua/conform/formatters/snakefmt.lua new file mode 100644 index 0000000..fccdeaa --- /dev/null +++ b/lua/conform/formatters/snakefmt.lua @@ -0,0 +1,10 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/snakemake/snakefmt", + description = "a formatting tool for Snakemake files following the design of Black.", + }, + command = "snakefmt", + args = "$FILENAME", + stdin = false, +} |