Skip to content

Commit 880aa37

Browse files
authored
feat: add format-dune-file (#602)
1 parent dd80443 commit 880aa37

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ You can view this list in vim with `:help conform-formatters`
238238
- [fixjson](https://github.com/rhysd/fixjson) - JSON Fixer for Humans using (relaxed) JSON5.
239239
- [fnlfmt](https://git.sr.ht/~technomancy/fnlfmt) - A formatter for Fennel code.
240240
- [forge_fmt](https://github.com/foundry-rs/foundry) - Forge is a command-line tool that ships with Foundry. Forge tests, builds, and deploys your smart contracts.
241+
- [format-dune-file](https://github.com/ocaml/dune) - Auto-formatter for Dune files.
241242
- [format-queries](https://github.com/nvim-treesitter/nvim-treesitter/blob/main/CONTRIBUTING.md#formatting) - Tree-sitter query formatter.
242243
- [fourmolu](https://hackage.haskell.org/package/fourmolu) - A fork of ormolu that uses four space indentation and allows arbitrary configuration.
243244
- [fprettify](https://github.com/fortran-lang/fprettify) - Auto-formatter for modern fortran source code.

doc/conform.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ FORMATTERS *conform-formatter
331331
`fnlfmt` - A formatter for Fennel code.
332332
`forge_fmt` - Forge is a command-line tool that ships with Foundry. Forge tests,
333333
builds, and deploys your smart contracts.
334+
`format-dune-file` - Auto-formatter for Dune files.
334335
`format-queries` - Tree-sitter query formatter.
335336
`fourmolu` - A fork of ormolu that uses four space indentation and allows
336337
arbitrary configuration.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---@type conform.FileFormatterConfig
2+
return {
3+
meta = {
4+
url = "https://github.com/ocaml/dune",
5+
description = "Auto-formatter for Dune files.",
6+
},
7+
command = "dune",
8+
args = { "format-dune-file" },
9+
stdin = true,
10+
}

0 commit comments

Comments
 (0)