aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--doc/conform.txt1
-rw-r--r--lua/conform/formatters/nimpretty.lua10
3 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index ee35faf..4c30f08 100644
--- a/README.md
+++ b/README.md
@@ -246,6 +246,7 @@ You can view this list in vim with `:help conform-formatters`
- [mdformat](https://github.com/executablebooks/mdformat) - An opinionated Markdown formatter.
- [mdslw](https://github.com/razziel89/mdslw) - Prepare your markdown for easy diff'ing by adding line breaks after every sentence.
- [mix](https://hexdocs.pm/mix/main/Mix.Tasks.Format.html) - Format Elixir files using the mix format command.
+- [nimpretty](https://github.com/nim-lang/nim) - nimpretty is a Nim source code beautifier that follows the official style guide.
- [nixfmt](https://github.com/serokell/nixfmt) - nixfmt is a formatter for Nix code, intended to apply a uniform style.
- [nixpkgs_fmt](https://github.com/nix-community/nixpkgs-fmt) - nixpkgs-fmt is a Nix code formatter for nixpkgs.
- [ocamlformat](https://github.com/ocaml-ppx/ocamlformat) - Auto-formatter for OCaml code.
diff --git a/doc/conform.txt b/doc/conform.txt
index e0d1581..310c2f0 100644
--- a/doc/conform.txt
+++ b/doc/conform.txt
@@ -273,6 +273,7 @@ FORMATTERS *conform-formatter
`mdslw` - Prepare your markdown for easy diff'ing by adding line breaks after
every sentence.
`mix` - Format Elixir files using the mix format command.
+`nimpretty` - nimpretty is a Nim source code beautifier that follows the official style guide.
`nixfmt` - nixfmt is a formatter for Nix code, intended to apply a uniform
style.
`nixpkgs_fmt` - nixpkgs-fmt is a Nix code formatter for nixpkgs.
diff --git a/lua/conform/formatters/nimpretty.lua b/lua/conform/formatters/nimpretty.lua
new file mode 100644
index 0000000..0cb5be2
--- /dev/null
+++ b/lua/conform/formatters/nimpretty.lua
@@ -0,0 +1,10 @@
+---@type conform.FileFormatterConfig
+return {
+ meta = {
+ url = "https://github.com/nim-lang/nim",
+ description = "nimpretty is a Nim source code beautifier that follows the official style guide.",
+ },
+ command = "nimpretty",
+ args = { "$FILENAME" },
+ stdin = false,
+}