Skip to content

Commit

Permalink
feat: add format-dune-file (#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
devkvlt authored Dec 21, 2024
1 parent dd80443 commit 880aa37
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ You can view this list in vim with `:help conform-formatters`
- [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.
- [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.
- [format-dune-file](https://github.com/ocaml/dune) - Auto-formatter for Dune files.
- [format-queries](https://github.com/nvim-treesitter/nvim-treesitter/blob/main/CONTRIBUTING.md#formatting) - Tree-sitter query formatter.
- [fourmolu](https://hackage.haskell.org/package/fourmolu) - A fork of ormolu that uses four space indentation and allows arbitrary configuration.
- [fprettify](https://github.com/fortran-lang/fprettify) - Auto-formatter for modern fortran source code.
Expand Down
1 change: 1 addition & 0 deletions doc/conform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ FORMATTERS *conform-formatter
`fnlfmt` - A formatter for Fennel code.
`forge_fmt` - Forge is a command-line tool that ships with Foundry. Forge tests,
builds, and deploys your smart contracts.
`format-dune-file` - Auto-formatter for Dune files.
`format-queries` - Tree-sitter query formatter.
`fourmolu` - A fork of ormolu that uses four space indentation and allows
arbitrary configuration.
Expand Down
10 changes: 10 additions & 0 deletions lua/conform/formatters/format-dune-file.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://github.com/ocaml/dune",
description = "Auto-formatter for Dune files.",
},
command = "dune",
args = { "format-dune-file" },
stdin = true,
}

0 comments on commit 880aa37

Please sign in to comment.