aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJinjun Liang <kumkee@users.noreply.github.com>2024-02-20 16:48:01 +1300
committerGitHub <noreply@github.com>2024-02-19 19:48:01 -0800
commit0d997149a0472ab811bcfdca5dc45d9db483f949 (patch)
treeeaaeb944f2d72740cbd419091fc1c2e57fb47d09
parent61cff430c9f15770d0c5e68c1b08067223bd94ab (diff)
feat: add fantomas formatter (#302)
* feat: add fantomas formatter * fantomas: + args * fantomas: + stdin = false
-rw-r--r--README.md1
-rw-r--r--lua/conform/formatters/fantomas.lua10
2 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index 868639c..fba041f 100644
--- a/README.md
+++ b/README.md
@@ -213,6 +213,7 @@ You can view this list in vim with `:help conform-formatters`
- [erb_format](https://github.com/nebulab/erb-formatter) - Format ERB files with speed and precision.
- [eslint_d](https://github.com/mantoni/eslint_d.js/) - Like ESLint, but faster.
- [fish_indent](https://fishshell.com/docs/current/cmds/fish_indent.html) - Indent or otherwise prettify a piece of fish code.
+- [fantomas](https://github.com/fsprojects/fantomas) - F# source code formatter.
- [fixjson](https://github.com/rhysd/fixjson) - JSON Fixer for Humans using (relaxed) JSON5.
- [fnlfmt](https://git.sr.ht/~technomancy/fnlfmt) - A formatter for Fennel code.
- [fourmolu](https://hackage.haskell.org/package/fourmolu) - Fourmolu is a formatter for Haskell source code.
diff --git a/lua/conform/formatters/fantomas.lua b/lua/conform/formatters/fantomas.lua
new file mode 100644
index 0000000..9244feb
--- /dev/null
+++ b/lua/conform/formatters/fantomas.lua
@@ -0,0 +1,10 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/fsprojects/fantomas",
+ description = "F# source code formatter.",
+ },
+ command = "fantomas",
+ args = { "$FILENAME" },
+ stdin = false,
+}