Skip to content

Commit

Permalink
feat: add support for nimpretty (#343)
Browse files Browse the repository at this point in the history
* feat: add support for nimpretty

* fix: add formatter type
  • Loading branch information
hougesen committed Mar 18, 2024
1 parent 5ec563f commit 67f7fb2
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 @@ -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.
Expand Down
1 change: 1 addition & 0 deletions doc/conform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions lua/conform/formatters/nimpretty.lua
Original file line number Diff line number Diff line change
@@ -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,
}

0 comments on commit 67f7fb2

Please sign in to comment.