Skip to content

Commit

Permalink
feat: add snakefmt formatter for snakemake files (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrhjoh authored May 11, 2024
1 parent a3e3e0e commit dc950e5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions doc/conform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions lua/conform/formatters/snakefmt.lua
Original file line number Diff line number Diff line change
@@ -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,
}

0 comments on commit dc950e5

Please sign in to comment.