diff options
author | Mads Hougesen <mads@mhouge.dk> | 2024-06-01 21:01:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-01 12:01:08 -0700 |
commit | 9f46982b8dc2bf1e267d386ccd096f896369e323 (patch) | |
tree | b80d17e34404f9e4292a9a13ada09fbe02e1032a | |
parent | 11ee87a23187817cad233fe0d61d461105e3eda9 (diff) |
feat: add support for hindent (#430)
Adds support for Haskell formatter hindent
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | doc/conform.txt | 1 | ||||
-rw-r--r-- | lua/conform/formatters/hindent.lua | 10 |
3 files changed, 12 insertions, 0 deletions
@@ -235,6 +235,7 @@ You can view this list in vim with `:help conform-formatters` - [golines](https://github.com/segmentio/golines) - A golang formatter that fixes long lines. - [google-java-format](https://github.com/google/google-java-format) - Reformats Java source code according to Google Java Style. - [hcl](https://github.com/hashicorp/hcl) - A formatter for HCL files. +- [hindent](https://github.com/mihaimaruseac/hindent) - Haskell pretty printer. - [htmlbeautifier](https://github.com/threedaymonk/htmlbeautifier) - A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates. - [indent](https://www.gnu.org/software/indent/) - GNU Indent. - [injected](doc/advanced_topics.md#injected-language-formatting-code-blocks) - Format treesitter injected languages. diff --git a/doc/conform.txt b/doc/conform.txt index e81b2d6..1b763d3 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -280,6 +280,7 @@ FORMATTERS *conform-formatter `google-java-format` - Reformats Java source code according to Google Java Style. `hcl` - A formatter for HCL files. +`hindent` - Haskell pretty printer. `htmlbeautifier` - A normaliser/beautifier for HTML that also understands embedded Ruby. Ideal for tidying up Rails templates. `indent` - GNU Indent. diff --git a/lua/conform/formatters/hindent.lua b/lua/conform/formatters/hindent.lua new file mode 100644 index 0000000..bf2656a --- /dev/null +++ b/lua/conform/formatters/hindent.lua @@ -0,0 +1,10 @@ +---@type conform.FileFormatterConfig +return { + meta = { + url = "https://github.com/mihaimaruseac/hindent", + description = "Haskell pretty printer.", + }, + command = "hindent", + args = { "$FILENAME" }, + stdin = false, +} |