aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters
diff options
context:
space:
mode:
authorMarcus Fernandes <marcusbfs@gmail.com>2024-05-09 23:52:22 -0300
committerGitHub <noreply@github.com>2024-05-09 20:52:22 -0600
commit6207f41e8f3813d72ef4499a8132c11d8baabe9f (patch)
treec402673c61ee3fca153290a71ce46febbddc8646 /lua/conform/formatters
parent6dc1603ea408f476a57937bbeaf7f86520a21a98 (diff)
feat: add ormolu formatter for Haskell (#377) (#397)
* feat: add ormolu formatter for Haskell (#377) * add ormolu references to README.md and doc/conform.txt * revert wrong auto typo fix by codespell * update meta field in the formatter * doc: typo --------- Co-authored-by: Steven Arcangeli <506791+stevearc@users.noreply.github.com>
Diffstat (limited to 'lua/conform/formatters')
-rw-r--r--lua/conform/formatters/fourmolu.lua2
-rw-r--r--lua/conform/formatters/ormolu.lua10
2 files changed, 11 insertions, 1 deletions
diff --git a/lua/conform/formatters/fourmolu.lua b/lua/conform/formatters/fourmolu.lua
index 9c64999..4e1db8e 100644
--- a/lua/conform/formatters/fourmolu.lua
+++ b/lua/conform/formatters/fourmolu.lua
@@ -2,7 +2,7 @@
return {
meta = {
url = "https://hackage.haskell.org/package/fourmolu",
- description = "Fourmolu is a formatter for Haskell source code.",
+ description = "A fork of ormolu that uses four space indentation and allows arbitrary configuration.",
},
command = "fourmolu",
args = { "--stdin-input-file", "$FILENAME" },
diff --git a/lua/conform/formatters/ormolu.lua b/lua/conform/formatters/ormolu.lua
new file mode 100644
index 0000000..4c36929
--- /dev/null
+++ b/lua/conform/formatters/ormolu.lua
@@ -0,0 +1,10 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://hackage.haskell.org/package/ormolu",
+ description = "A formatter for Haskell source code.",
+ },
+ command = "ormolu",
+ args = { "--stdin-input-file", "$FILENAME" },
+ stdin = true,
+}