diff options
author | Sebastian Selander <70573736+sebastianselander@users.noreply.github.com> | 2024-03-02 17:12:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 08:12:50 -0800 |
commit | ea73026a163e124edb47fe48075091d924d139af (patch) | |
tree | 8f657755fcce3dd8dbc2490f7626dd493a6bd62a | |
parent | f882877f03ebd46067c6a5493d259c4b9a9280f0 (diff) |
feat: add the cabal-fmt formatter (#318)
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | lua/conform/formatters/cabal_fmt.lua | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -195,6 +195,7 @@ You can view this list in vim with `:help conform-formatters` - [blue](https://github.com/grantjenks/blue) - The slightly less uncompromising Python code formatter. - [buf](https://buf.build/docs/reference/cli/buf/format) - A new way of working with Protocol Buffers. - [buildifier](https://github.com/bazelbuild/buildtools/tree/master/buildifier) - buildifier is a tool for formatting bazel BUILD and .bzl files with a standard convention. +- [cabal_fmt](https://hackage.haskell.org/package/cabal-fmt) Format .cabal files preserving the original field ordering, and comments. - [cbfmt](https://github.com/lukas-reineke/cbfmt) - A tool to format codeblocks inside markdown and org documents. - [clang_format](https://www.kernel.org/doc/html/latest/process/clang-format.html) - Tool to format C/C++/… code according to a set of rules and heuristics. - [cljstyle](https://github.com/greglook/cljstyle) - Formatter for Clojure code. diff --git a/lua/conform/formatters/cabal_fmt.lua b/lua/conform/formatters/cabal_fmt.lua new file mode 100644 index 0000000..698e22c --- /dev/null +++ b/lua/conform/formatters/cabal_fmt.lua @@ -0,0 +1,8 @@ +return { + meta = { + url = "https://hackage.haskell.org/package/cabal-fmt", + description = "Format cabal files with cabal-fmt", + }, + command = "cabal-fmt", + stdin = true, +} |